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

Add ibc-go v9 to chains running tests in CI #4152

Merged
merged 7 commits into from
Aug 15, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add ibc-go `v9` to the chains running the integration tests in the CI.
([\#4151](https://github.com/informalsystems/hermes/issues/4151))
5 changes: 5 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ jobs:
account_prefix: cosmos
native_token: stake
features: ica,ics29-fee,new-register-interchain-account,channel-upgrade,authz
- package: ibc-go-v9-simapp
command: simd
account_prefix: cosmos
native_token: stake
features: ica,ics29-fee,new-register-interchain-account,channel-upgrade,authz,no-denom-trace
- package: wasmd
command: wasmd
account_prefix: wasm
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/multi-chains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
- package: ibc-go-v8-simapp
command: simd
account_prefix: cosmos
- package: ibc-go-v9-simapp
command: simd
account_prefix: cosmos
second-package:
- package: osmosis
command: osmosisd
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
ibc-go-v6-simapp
ibc-go-v7-simapp
ibc-go-v8-simapp
ibc-go-v9-simapp
interchain-security
migaloo
neutron
Expand Down
1 change: 1 addition & 0 deletions tools/integration-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dynamic-gas-fee = []
new-register-interchain-account = []
authz = []
benchmark = []
no-denom-trace = []

[[bin]]
name = "test_setup_with_binary_channel"
Expand Down
6 changes: 3 additions & 3 deletions tools/integration-test/src/tests/ica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ibc_relayer_types::tx_msg::Msg;

use ibc_test_framework::chain::{
config::add_allow_message_interchainaccounts,
ext::ica::{register_interchain_account, register_ordered_interchain_account},
ext::ica::{register_ordered_interchain_account, register_unordered_interchain_account},
};
use ibc_test_framework::prelude::*;
use ibc_test_framework::relayer::channel::{
Expand Down Expand Up @@ -99,7 +99,7 @@ impl BinaryConnectionTest for IcaFilterTestAllow {
// Register an interchain account on behalf of
// controller wallet `user1` where the counterparty chain is the interchain accounts host.
let (wallet, channel_id, port_id) =
register_interchain_account(&chains.node_a, chains.handle_a(), &connection)?;
register_unordered_interchain_account(&chains.node_a, chains.handle_a(), &connection)?;

// Check that the corresponding ICA channel is eventually established.
let _counterparty_channel_id = assert_eventually_channel_established(
Expand Down Expand Up @@ -211,7 +211,7 @@ impl BinaryConnectionTest for IcaFilterTestDeny {
// Register an interchain account on behalf of controller wallet `user1`
// where the counterparty chain is the interchain accounts host.
let (_, channel_id, port_id) =
register_interchain_account(&chains.node_a, chains.handle_a(), &connection)?;
register_unordered_interchain_account(&chains.node_a, chains.handle_a(), &connection)?;

// Wait a bit, the relayer will refuse to complete the channel handshake
// because the port is explicitly disallowed by the filter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ibc_relayer_types::signer::Signer;
use ibc_relayer_types::timestamp::Timestamp;
use ibc_relayer_types::tx_msg::Msg;
use ibc_test_framework::chain::config::add_allow_message_interchainaccounts;
use ibc_test_framework::chain::ext::ica::register_interchain_account;
use ibc_test_framework::chain::ext::ica::register_ordered_interchain_account;
use ibc_test_framework::framework::binary::channel::run_binary_interchain_security_channel_test;
use ibc_test_framework::prelude::*;
use ibc_test_framework::relayer::channel::assert_eventually_channel_established;
Expand Down Expand Up @@ -74,8 +74,11 @@ impl BinaryChannelTest for IcaOrderedChannelTest {
let fee_denom_a: MonoTagged<ChainA, Denom> =
MonoTagged::new(Denom::base(config.native_token(0)));
let connection_b_to_a = channel.connection.clone().flip();
let (wallet, channel_id, port_id) =
register_interchain_account(&chains.node_b, chains.handle_b(), &connection_b_to_a)?;
let (wallet, channel_id, port_id) = register_ordered_interchain_account(
&chains.node_b,
chains.handle_b(),
&connection_b_to_a,
)?;

relayer.with_supervisor(|| {
// Check that the corresponding ICA channel is eventually established.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ibc_relayer_types::signer::Signer;
use ibc_relayer_types::timestamp::Timestamp;
use ibc_relayer_types::tx_msg::Msg;
use ibc_test_framework::chain::config::add_allow_message_interchainaccounts;
use ibc_test_framework::chain::ext::ica::register_interchain_account;
use ibc_test_framework::chain::ext::ica::register_unordered_interchain_account;
use ibc_test_framework::framework::binary::channel::run_binary_interchain_security_channel_test;
use ibc_test_framework::prelude::*;
use ibc_test_framework::relayer::channel::assert_eventually_channel_established;
Expand Down Expand Up @@ -57,8 +57,11 @@ impl BinaryChannelTest for InterchainSecurityIcaTransferTest {
let fee_denom_a: MonoTagged<ChainA, Denom> =
MonoTagged::new(Denom::base(config.native_token(0)));
let connection_b_to_a = channel.connection.clone().flip();
let (wallet, channel_id, port_id) =
register_interchain_account(&chains.node_b, chains.handle_b(), &connection_b_to_a)?;
let (wallet, channel_id, port_id) = register_unordered_interchain_account(
&chains.node_b,
chains.handle_b(),
&connection_b_to_a,
)?;

// Check that the corresponding ICA channel is eventually established.
let _counterparty_channel_id = assert_eventually_channel_established(
Expand Down
1 change: 1 addition & 0 deletions tools/integration-test/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod client_settings;
pub mod client_upgrade;
pub mod connection_delay;
pub mod consensus_states;
#[cfg(not(feature = "no-denom-trace"))]
pub mod denom_trace;
pub mod error_events;
pub mod execute_schedule;
Expand Down
48 changes: 34 additions & 14 deletions tools/test-framework/src/chain/ext/ica.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use ibc_relayer::upgrade_chain::requires_legacy_upgrade_proposal;
use serde_json::json;

use ibc_relayer::chain::tracking::TrackedMsgs;
Expand Down Expand Up @@ -63,7 +64,7 @@ impl<'a, Chain: Send> InterchainAccountMethodsExt<Chain> for MonoTagged<Chain, &
}

#[allow(clippy::type_complexity)]
pub fn register_interchain_account<Chain: ChainHandle, Counterparty: ChainHandle>(
pub fn register_unordered_interchain_account<Chain: ChainHandle, Counterparty: ChainHandle>(
chain: &MonoTagged<Chain, FullNode>,
handle: &Chain,
connection: &ConnectedConnection<Chain, Counterparty>,
Expand All @@ -87,14 +88,24 @@ pub fn register_interchain_account<Chain: ChainHandle, Counterparty: ChainHandle
"host_connection_id": connection.connection_id_b.0
});

let msg = LegacyMsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
let msg_any = if requires_legacy_upgrade_proposal(handle.clone()) {
let msg = LegacyMsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
};

msg.to_any()
} else {
let msg = MsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
ordering: Ordering::Unordered,
};
msg.to_any()
};

let msg_any = msg.to_any();

let tm = TrackedMsgs::new_static(vec![msg_any], "RegisterInterchainAccount");

let events = handle
Expand Down Expand Up @@ -143,15 +154,24 @@ pub fn register_ordered_interchain_account<Chain: ChainHandle, Counterparty: Cha
"host_connection_id": connection.connection_id_b.0
});

let msg = MsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
ordering: Ordering::Ordered,
let msg_any = if requires_legacy_upgrade_proposal(handle.clone()) {
let msg = LegacyMsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
};

msg.to_any()
} else {
let msg = MsgRegisterInterchainAccount {
owner,
connection_id: connection.connection_id_a.0.clone(),
version: Version::new(version_obj.to_string()),
ordering: Ordering::Ordered,
};
msg.to_any()
};

let msg_any = msg.to_any();

let tm = TrackedMsgs::new_static(vec![msg_any], "RegisterInterchainAccount");

let events = handle
Expand Down
Loading