-
Notifications
You must be signed in to change notification settings - Fork 128
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -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 { |
There was a problem hiding this comment.
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
chain/cosmos/ics.go
Outdated
require.NoError(t, r.StopRelayer(ctx, eRep)) | ||
require.NoError(t, r.StartRelayer(ctx, eRep, ibcPath)) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
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) |
There was a problem hiding this comment.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! LGTM
* 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
…#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>
ref: #1088 (comment)
TODO