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

feat: bump ibc-go to v9.0.2 #1327

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion blockdb/tui/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/atotto/clipboard"
"github.com/rivo/tview"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

//go:generate go run golang.org/x/tools/cmd/stringer -type=mainContent
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

func TestModel_RootView(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/cosmos_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strconv"
"strings"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

// CosmosMessage presents a blockdb.CosmosMessageResult.
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/cosmos_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

func TestCosmosMessage(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package presenter
import (
"strconv"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

// TestCase presents a blockdb.TestCaseResult.
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/test_case_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

func TestTestCase(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"sync"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

var bufPool = sync.Pool{New: func() any { return new(bytes.Buffer) }}
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

func TestTx(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

"github.com/strangelove-ventures/interchaintest/v8/blockdb/tui/presenter"
"github.com/strangelove-ventures/interchaintest/v9/blockdb/tui/presenter"
)

// Update should be the argument for *(tview.Application).SetInputCapture.
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/rivo/tview"
"github.com/stretchr/testify/require"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions blockdb/tui/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v8/blockdb/tui/presenter"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/blockdb/tui/presenter"
)

func headerView(m *Model) *tview.Flex {
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/08-wasm-types/client_message.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/cosmos/ibc-go/v9/modules/core/exported"
)

var _ exported.ClientMessage = &ClientMessage{}
Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/08-wasm-types/client_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package types
import (
storetypes "cosmossdk.io/store/types"

clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" // nolint:staticcheck
"github.com/cosmos/ibc-go/v8/modules/core/exported"
clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" // nolint:staticcheck
"github.com/cosmos/ibc-go/v9/modules/core/exported"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/08-wasm-types/codec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/cosmos/ibc-go/v9/modules/core/exported"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/08-wasm-types/consensus_state.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/cosmos/ibc-go/v9/modules/core/exported"
)

var _ exported.ConsensusState = (*ConsensusState)(nil)
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/08-wasm-types/wasm.pb.go

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

4 changes: 2 additions & 2 deletions chain/cosmos/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"

"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/testutil"
)

type ClientContextOpt func(clientContext client.Context) client.Context
Expand Down
13 changes: 6 additions & 7 deletions chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
ccvclient "github.com/cosmos/interchain-security/v5/x/ccv/provider/client"
icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -46,10 +45,10 @@ import (
coretypes "github.com/cometbft/cometbft/rpc/core/types"
libclient "github.com/cometbft/cometbft/rpc/jsonrpc/client"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
"github.com/strangelove-ventures/interchaintest/v9/testutil"
)

// ChainNode represents a node in the test network that is being created.
Expand Down Expand Up @@ -887,7 +886,7 @@ func (tn *ChainNode) SendIBCTransfer(
return tn.ExecTx(ctx, keyName, command...)
}

func (tn *ChainNode) ConsumerAdditionProposal(ctx context.Context, keyName string, prop ccvclient.ConsumerAdditionProposalJSON) (string, error) {
func (tn *ChainNode) ConsumerAdditionProposal(ctx context.Context, keyName string, prop ConsumerAdditionProposalJSON) (string, error) {
propBz, err := json.Marshal(prop)
if err != nil {
return "", err
Expand Down
10 changes: 4 additions & 6 deletions chain/cosmos/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"cosmossdk.io/x/upgrade"

"github.com/cosmos/ibc-go/modules/capability"
transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer"
ibccore "github.com/cosmos/ibc-go/v8/modules/core"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
ccvprovider "github.com/cosmos/interchain-security/v5/x/ccv/provider"
transfer "github.com/cosmos/ibc-go/v9/modules/apps/transfer"
ibccore "github.com/cosmos/ibc-go/v9/modules/core"
ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand All @@ -28,7 +27,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"

ibcwasm "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos/08-wasm-types"
ibcwasm "github.com/strangelove-ventures/interchaintest/v9/chain/cosmos/08-wasm-types"
)

func DefaultEncoding() testutil.TestEncodingConfig {
Expand All @@ -53,7 +52,6 @@ func DefaultEncoding() testutil.TestEncodingConfig {
ibccore.AppModuleBasic{},
ibctm.AppModuleBasic{},
ibcwasm.AppModuleBasic{},
ccvprovider.AppModuleBasic{},
)
}

Expand Down
20 changes: 9 additions & 11 deletions chain/cosmos/cosmos_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (

sdkmath "cosmossdk.io/math"

clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" // nolint:staticcheck
chanTypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
ccvclient "github.com/cosmos/interchain-security/v5/x/ccv/provider/client"
clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" // nolint:staticcheck
chanTypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand All @@ -34,13 +33,12 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"

"github.com/strangelove-ventures/interchaintest/v8/blockdb"
wasmtypes "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos/08-wasm-types"
"github.com/strangelove-ventures/interchaintest/v8/chain/internal/tendermint"
"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/strangelove-ventures/interchaintest/v9/blockdb"
wasmtypes "github.com/strangelove-ventures/interchaintest/v9/chain/cosmos/08-wasm-types"
"github.com/strangelove-ventures/interchaintest/v9/chain/internal/tendermint"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
"github.com/strangelove-ventures/interchaintest/v9/testutil"
)

// CosmosChain is a local docker testnet for a Cosmos SDK chain.
Expand Down Expand Up @@ -513,7 +511,7 @@ func (c *CosmosChain) QueryBankMetadata(ctx context.Context, denom string) (*Ban
}

// ConsumerAdditionProposal submits a legacy governance proposal to add a consumer to the chain.
func (c *CosmosChain) ConsumerAdditionProposal(ctx context.Context, keyName string, prop ccvclient.ConsumerAdditionProposalJSON) (tx TxProposal, _ error) {
func (c *CosmosChain) ConsumerAdditionProposal(ctx context.Context, keyName string, prop ConsumerAdditionProposalJSON) (tx TxProposal, _ error) {
txHash, err := c.GetFullNode().ConsumerAdditionProposal(ctx, keyName, prop)
if err != nil {
return tx, fmt.Errorf("failed to submit consumer addition proposal: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/icza/dyno"

"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
)

type GenesisKV struct {
Expand Down
41 changes: 34 additions & 7 deletions chain/cosmos/ics.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,51 @@ import (

sdkmath "cosmossdk.io/math"

clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" // nolint:staticcheck
ccvclient "github.com/cosmos/interchain-security/v5/x/ccv/provider/client"
clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" // nolint:staticcheck

"github.com/cosmos/cosmos-sdk/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingttypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v8/testreporter"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
"github.com/strangelove-ventures/interchaintest/v9/testreporter"
"github.com/strangelove-ventures/interchaintest/v9/testutil"
)

const (
icsVer330 = "v3.3.0"
icsVer400 = "v4.0.0"
)

// https://github.com/cosmos/interchain-security/blob/v5.1.1/x/ccv/provider/client/legacy_proposals.go
// may change with permissionless ICS.
type ConsumerAdditionProposalJSON struct {
Title string `json:"title"`
Summary string `json:"summary"`
ChainId string `json:"chain_id"`
InitialHeight clienttypes.Height `json:"initial_height"`
GenesisHash []byte `json:"genesis_hash"`
BinaryHash []byte `json:"binary_hash"`
SpawnTime time.Time `json:"spawn_time"`

ConsumerRedistributionFraction string `json:"consumer_redistribution_fraction"`
BlocksPerDistributionTransmission int64 `json:"blocks_per_distribution_transmission"`
DistributionTransmissionChannel string `json:"distribution_transmission_channel"`
HistoricalEntries int64 `json:"historical_entries"`
CcvTimeoutPeriod time.Duration `json:"ccv_timeout_period"`
TransferTimeoutPeriod time.Duration `json:"transfer_timeout_period"`
UnbondingPeriod time.Duration `json:"unbonding_period"`

Deposit string `json:"deposit"`

TopN uint32 `json:"top_N"`
ValidatorsPowerCap uint32 `json:"validators_power_cap"`
ValidatorSetCap uint32 `json:"validator_set_cap"`
Allowlist []string `json:"allowlist"`
Denylist []string `json:"denylist"`
}

// FinishICSProviderSetup sets up the base of an ICS connection with respect to the relayer, provider actions, and flushing of packets.
// 1. Stop the relayer, then start it back up. This completes the ICS20-1 transfer channel setup.
// - You must set look-back block history >100 blocks in [interchaintest.NewBuiltinRelayerFactory].
Expand Down Expand Up @@ -161,7 +188,7 @@ func (c *CosmosChain) StartProvider(testName string, ctx context.Context, additi
return fmt.Errorf("invalid ICS_SPAWN_TIME_WAIT %s: %w", spawnTimeWait, err)
}
for _, consumer := range c.Consumers {
prop := ccvclient.ConsumerAdditionProposalJSON{
prop := ConsumerAdditionProposalJSON{
Title: fmt.Sprintf("Addition of %s consumer chain", consumer.cfg.Name),
Summary: "Proposal to add new consumer chain",
ChainId: consumer.cfg.ChainID,
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/authz"

"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
)

// AuthzGrant grants a message as a permission to an account.
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
)

// BankSend sends tokens from one account to another.
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_cosmwasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/cosmos/cosmos-sdk/types"

"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/strangelove-ventures/interchaintest/v9/testutil"
)

type InstantiateContractAttribute struct {
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"

"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
)

// VoteOnProposal submits a vote for the specified proposal.
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_tokenfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strconv"

"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v9/ibc"
)

// TokenFactoryCreateDenom creates a new tokenfactory token in the format 'factory/accountaddress/name'.
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/module_vesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli"

"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v9/dockerutil"
)

// VestingCreateAccount creates a new vesting account funded with an allocation of tokens. The account can either be a delayed or continuous vesting account, which is determined by the '--delayed' flag.
Expand Down
Loading
Loading