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

test(ics): validate consumer transactions execute #1115

Merged
merged 16 commits into from
May 8, 2024

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented May 6, 2024

ref: #1088 (comment)

TODO

Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
interchaintest-docs ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 11:06pm

@Reecepbcups Reecepbcups added the BACKPORT backport into all maintained branches label May 6, 2024
@Reecepbcups Reecepbcups changed the title test(ics): ensure ICS consumer transactions execute test(ics): validate consumer transactions execute May 6, 2024
examples/ibc/ics_test.go Outdated Show resolved Hide resolved
@Reecepbcups Reecepbcups marked this pull request as ready for review May 7, 2024 19:27
@Reecepbcups Reecepbcups requested a review from a team as a code owner May 7, 2024 19:27
@Reecepbcups Reecepbcups requested a review from jtieri May 7, 2024 19:27
@@ -1044,323 +1034,6 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene
return testutil.WaitForBlocks(ctx, 2, c.getFullNode())
}

// Bootstraps the provider chain and starts it from genesis
func (c *CosmosChain) StartProvider(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all just copy pasted to the new ics.go file. Easier future maintenance since it typically lags major versions

Comment on lines 45 to 46
require.NoError(t, r.StopRelayer(ctx, eRep))
require.NoError(t, r.StartRelayer(ctx, eRep, ibcPath))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with just StartRelayer but it does not work, likely since the relayer is already running in the background. I don't feel a RestartRelayer is needed on the relayer interface for this.

}

// Bootstraps the provider chain and starts it from genesis
func (c *CosmosChain) StartProvider(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything below is copy paste from other file

Comment on lines +204 to +210
if len(icsProviderPaths) > 0 {
logger.Info("ICS provider setup", zap.Any("icsProviderPaths", icsProviderPaths))

for ibcPath, chain := range icsProviderPaths {
if provider, ok := chain.(*cosmos.CosmosChain); ok {
if err := provider.FinishICSProviderSetup(ctx, relayer, eRep, ibcPath); err != nil {
log.Fatal("FinishICSProviderSetup", err)
Copy link
Member Author

@Reecepbcups Reecepbcups May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local-ic start interchainsecurity, manually tested and executed against a neutron testnet without issue :)

local-ic interact localneutron-1 bin 'tx bank send acc0 neutron1hj5fveer5cjtn4wd6wstzugjfdxzl0xpznmsky 5untrn --keyring-backend=test --node=%RPC% --chain-id=%CHAIN_ID% --yes'

Chains without ICS (base.json) function as expected as well

@Reecepbcups
Copy link
Member Author

interchaintest.DefaultBlockDatabaseFilepath keeps sneaking back into test 😂

Copy link
Member

@joelsmith-2019 joelsmith-2019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! LGTM

@Reecepbcups Reecepbcups merged commit 65cce0c into main May 8, 2024
19 checks passed
@Reecepbcups Reecepbcups deleted the reece/ics-v8-further-testing branch May 8, 2024 19:44
mergify bot pushed a commit that referenced this pull request May 8, 2024
* base WIP

* try the prev attempt with new migration

* attempting to bring back old + migration, no work

* working

* reduce complexity

* add p->c IBC test (fails due to TRYOPEN)

* rm unused

* move ICS functions to their own .go

* StartRelayer right after build with longer history

* touchups

* add back `StopRelayer` before `StartRelayer`

* refactor: `FinishICSProviderSetup`

* multiple ICS version checks (v3.1, 3.3, 4.0)

* local-ic: call FinishICSProviderSetup on setup

* rm `interchaintest.DefaultBlockDatabaseFilepath`

* rm `interchaintest.DefaultBlockDatabaseFilepath` from other test

(cherry picked from commit 65cce0c)

# Conflicts:
#	chain/cosmos/cosmos_chain.go
#	examples/cosmwasm/rust-optimizer/rust_optimizer_test.go
#	examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go
#	examples/ibc/ics_test.go
#	local-interchain/interchain/start.go
Reecepbcups added a commit that referenced this pull request May 10, 2024
…#1119)

* test(ics): validate consumer transactions execute (#1115)

* base WIP

* try the prev attempt with new migration

* attempting to bring back old + migration, no work

* working

* reduce complexity

* add p->c IBC test (fails due to TRYOPEN)

* rm unused

* move ICS functions to their own .go

* StartRelayer right after build with longer history

* touchups

* add back `StopRelayer` before `StartRelayer`

* refactor: `FinishICSProviderSetup`

* multiple ICS version checks (v3.1, 3.3, 4.0)

* local-ic: call FinishICSProviderSetup on setup

* rm `interchaintest.DefaultBlockDatabaseFilepath`

* rm `interchaintest.DefaultBlockDatabaseFilepath` from other test

(cherry picked from commit 65cce0c)

# Conflicts:
#	chain/cosmos/cosmos_chain.go
#	examples/cosmwasm/rust-optimizer/rust_optimizer_test.go
#	examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go
#	examples/ibc/ics_test.go
#	local-interchain/interchain/start.go

* merge in some non backported features

* add back in ICS test

* fix ICS test

---------

Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
Co-authored-by: Reece Williams <reecepbcups@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORT backport into all maintained branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants