diff --git a/crates/chain-registry/src/formatter.rs b/crates/chain-registry/src/formatter.rs index 44b46a1cdc..ee01dc61ca 100644 --- a/crates/chain-registry/src/formatter.rs +++ b/crates/chain-registry/src/formatter.rs @@ -2,7 +2,6 @@ //! Contains struct to build a `tendermint_rpc::Url` representing a //! WebSocket URL from a RPC URL and to parse or build a valid `http::Uri` //! from an (in)complete GRPC URL. - use std::str::FromStr; use http::{uri::Scheme, Uri}; diff --git a/crates/chain-registry/src/querier.rs b/crates/chain-registry/src/querier.rs index 6766545d22..ab67af90af 100644 --- a/crates/chain-registry/src/querier.rs +++ b/crates/chain-registry/src/querier.rs @@ -7,9 +7,8 @@ use std::{fmt::Debug, str::FromStr}; use async_trait::async_trait; use futures::{stream::FuturesUnordered, StreamExt}; use http::Uri; - use ibc_proto::cosmos::bank::v1beta1::query_client::QueryClient; -use tendermint_rpc::{Client as _, HttpClient, HttpClientUrl, Url}; +use tendermint_rpc::{Client, HttpClient, HttpClientUrl, Url}; use tracing::{debug, info}; use crate::error::RegistryError; diff --git a/crates/relayer-cli/src/chain_registry.rs b/crates/relayer-cli/src/chain_registry.rs index 3315596cba..61b1401a09 100644 --- a/crates/relayer-cli/src/chain_registry.rs +++ b/crates/relayer-cli/src/chain_registry.rs @@ -1,13 +1,13 @@ //! Contains functions to generate a relayer config for a given chain +use std::{ + collections::{BTreeMap, HashMap}, + fmt::Display, + marker::Send, +}; + use futures::future::join_all; use http::Uri; -use tendermint_rpc::Url; -use tokio::task::{JoinError, JoinHandle}; -use tracing::{error, trace}; - -use std::{collections::BTreeMap, collections::HashMap, fmt::Display, marker::Send}; - use ibc_chain_registry::{ asset_list::AssetList, chain::ChainData, @@ -30,6 +30,10 @@ use ibc_relayer::{ keyring::Store, }; +use tendermint_rpc::Url; +use tokio::task::{JoinError, JoinHandle}; +use tracing::{error, trace}; + const MAX_HEALTHY_QUERY_RETRIES: u8 = 5; /// Generate packet filters from Vec and load them in a Map(chain_name -> filter). diff --git a/crates/relayer-cli/src/commands/clear.rs b/crates/relayer-cli/src/commands/clear.rs index 9b3b5c4438..f8efb03df2 100644 --- a/crates/relayer-cli/src/commands/clear.rs +++ b/crates/relayer-cli/src/commands/clear.rs @@ -3,7 +3,10 @@ use std::ops::RangeInclusive; use abscissa_core::{clap::Parser, config::Override, Command, FrameworkErrorKind, Runnable}; use ibc_relayer::{ - chain::handle::{BaseChainHandle, ChainHandle}, + chain::{ + handle::{BaseChainHandle, ChainHandle}, + requests::{IncludeProof, QueryChannelRequest, QueryHeight}, + }, config::Config, link::{error::LinkError, Link, LinkParameters}, util::seq_range::parse_seq_range, @@ -16,11 +19,7 @@ use ibc_relayer_types::{ events::IbcEvent, }; -use ibc_relayer::chain::requests::{IncludeProof, QueryChannelRequest, QueryHeight}; - -use crate::application::app_config; -use crate::cli_utils::spawn_chain_counterparty; -use crate::conclude::Output; +use crate::{application::app_config, cli_utils::spawn_chain_counterparty, conclude::Output}; /// `clear` subcommands #[derive(Command, Debug, Parser, Runnable)] diff --git a/crates/relayer-cli/src/commands/config/auto.rs b/crates/relayer-cli/src/commands/config/auto.rs index 35087246ca..3638da2ba2 100644 --- a/crates/relayer-cli/src/commands/config/auto.rs +++ b/crates/relayer-cli/src/commands/config/auto.rs @@ -2,7 +2,6 @@ use std::{collections::HashSet, path::PathBuf}; use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::config::{store, ChainConfig, Config}; - use itertools::Itertools; use tracing::{error, info, warn}; diff --git a/crates/relayer-cli/src/commands/listen.rs b/crates/relayer-cli/src/commands/listen.rs index 25bf9ff5af..5bbc7f5086 100644 --- a/crates/relayer-cli/src/commands/listen.rs +++ b/crates/relayer-cli/src/commands/listen.rs @@ -10,7 +10,6 @@ use eyre::eyre; use ibc_relayer::{ chain::handle::Subscription, config::{ChainConfig, EventSourceMode}, - error::Error, event::source::EventSource, util::compat_mode::compat_mode_from_version, }; @@ -158,19 +157,13 @@ fn subscribe( EventSourceMode::Pull { interval, max_retries, - } => { - let mut rpc_client = HttpClient::new(config.rpc_addr.clone()) - .map_err(|e| Error::rpc(config.rpc_addr.clone(), e))?; - rpc_client.set_compat_mode(compat_mode); - - EventSource::rpc( - chain_config.id().clone(), - rpc_client, - *interval, - *max_retries, - rt, - ) - } + } => EventSource::rpc( + chain_config.id().clone(), + HttpClient::new(config.rpc_addr.clone())?, + *interval, + *max_retries, + rt, + ), }?; thread::spawn(move || event_source.run()); diff --git a/crates/relayer-cli/src/commands/query/packet/commitment.rs b/crates/relayer-cli/src/commands/query/packet/commitment.rs index 6a9777322b..26e49d56b1 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitment.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitment.rs @@ -10,6 +10,7 @@ use ibc_relayer_types::{ }, Height, }; +use serde::Serialize; use subtle_encoding::{Encoding, Hex}; use crate::{ @@ -19,6 +20,12 @@ use crate::{ prelude::*, }; +#[derive(Serialize, Debug)] +struct PacketSeqs { + height: Height, + seqs: Vec, +} + #[derive(Clone, Command, Debug, Parser, PartialEq, Eq)] pub struct QueryPacketCommitmentCmd { #[clap( diff --git a/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs b/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs index 7ca04b7c43..e492a24f98 100644 --- a/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs +++ b/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs @@ -4,11 +4,10 @@ use ibc_proto::{ }; use serde::{Deserialize, Serialize}; -use crate::core::ics04_channel::channel::Ordering; use crate::{ applications::ics27_ica::error::Error, core::{ - ics04_channel::version::Version, + ics04_channel::{channel::Ordering, version::Version}, ics24_host::{error::ValidationError, identifier::ConnectionId}, }, signer::Signer, diff --git a/crates/relayer-types/src/mock/header.rs b/crates/relayer-types/src/mock/header.rs index aac99e2154..700fb168f7 100644 --- a/crates/relayer-types/src/mock/header.rs +++ b/crates/relayer-types/src/mock/header.rs @@ -119,9 +119,10 @@ impl From for Any { #[cfg(test)] mod tests { - use super::*; use ibc_proto::Protobuf; + use super::*; + #[test] fn encode_any() { let header = MockHeader::new(Height::new(1, 10).unwrap()).with_timestamp(Timestamp::none()); diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index b542fc9439..0c76a30099 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -1,16 +1,17 @@ [package] -name = "ibc-relayer" + version = "0.27.2" edition = "2021" +rust-version = "1.71.1" +description = """ + Implementation of an IBC Relayer in Rust, as a library +""" +name = "ibc-relayer" license = "Apache-2.0" readme = "README.md" keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71.1" -description = """ - Implementation of an IBC Relayer in Rust, as a library -""" [package.metadata.docs.rs] all-features = true diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index 4df95c7b96..46e4f0898e 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -11,9 +11,12 @@ use bytes::{Buf, Bytes}; use futures::future::join_all; use ibc_proto::{ cosmos::{ - base::node::v1beta1::ConfigResponse, - base::tendermint::v1beta1::service_client::ServiceClient, - base::tendermint::v1beta1::{GetSyncingRequest, GetSyncingResponse}, + base::{ + node::v1beta1::ConfigResponse, + tendermint::v1beta1::{ + service_client::ServiceClient, GetSyncingRequest, GetSyncingResponse, + }, + }, staking::v1beta1::Params as StakingParams, }, ibc::apps::fee::v1::{QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse}, @@ -70,10 +73,6 @@ use self::{ types::{app_state::GenesisAppState, gas::GasConfig}, version::Specs, }; -use crate::util::pretty::PrettySlice; -use crate::util::pretty::{ - PrettyIdentifiedChannel, PrettyIdentifiedClientState, PrettyIdentifiedConnection, -}; use crate::{ account::Balance, chain::{ @@ -125,7 +124,13 @@ use crate::{ keyring::{KeyRing, Secp256k1KeyPair, SigningKeyPair}, light_client::{tendermint::LightClient as TmLightClient, LightClient, Verified}, misbehaviour::MisbehaviourEvidence, - util::compat_mode::compat_mode_from_version, + util::{ + compat_mode::compat_mode_from_version, + pretty::{ + PrettyIdentifiedChannel, PrettyIdentifiedClientState, PrettyIdentifiedConnection, + PrettySlice, + }, + }, }; pub mod batch; diff --git a/crates/relayer/src/chain/cosmos/config.rs b/crates/relayer/src/chain/cosmos/config.rs index f03ab297f8..8aa79cc849 100644 --- a/crates/relayer/src/chain/cosmos/config.rs +++ b/crates/relayer/src/chain/cosmos/config.rs @@ -3,9 +3,8 @@ use std::collections::BTreeMap; use std::path::PathBuf; use byte_unit::Byte; -use ibc_relayer_types::core::ics04_channel::packet::Sequence; - use ibc_relayer_types::core::{ + ics04_channel::packet::Sequence, ics23_commitment::specs::ProofSpecs, ics24_host::identifier::{ChainId, ChannelId}, }; diff --git a/crates/relayer/src/chain/cosmos/tx.rs b/crates/relayer/src/chain/cosmos/tx.rs index b05b8d8757..d1712c5c4f 100644 --- a/crates/relayer/src/chain/cosmos/tx.rs +++ b/crates/relayer/src/chain/cosmos/tx.rs @@ -2,8 +2,7 @@ use ibc_proto::{cosmos::tx::v1beta1::Fee, google::protobuf::Any}; use ibc_relayer_types::events::IbcEvent; use tendermint_rpc::{endpoint::broadcast::tx_sync::Response, Client, HttpClient, Url}; -use super::batch::send_batched_messages_and_wait_commit; -use super::estimate::EstimatedGas; +use super::{batch::send_batched_messages_and_wait_commit, estimate::EstimatedGas}; use crate::{ chain::cosmos::{ encode::sign_and_encode_tx, diff --git a/crates/relayer/src/chain/cosmos/version.rs b/crates/relayer/src/chain/cosmos/version.rs index 2e1c14faf4..217ff688d3 100644 --- a/crates/relayer/src/chain/cosmos/version.rs +++ b/crates/relayer/src/chain/cosmos/version.rs @@ -5,7 +5,6 @@ use core::fmt::{Display, Error as FmtError, Formatter}; use flex_error::define_error; - use ibc_proto::cosmos::base::tendermint::v1beta1::{Module, VersionInfo}; use tracing::trace; diff --git a/crates/relayer/src/chain/endpoint.rs b/crates/relayer/src/chain/endpoint.rs index 8e48d87edc..b9f5507c1b 100644 --- a/crates/relayer/src/chain/endpoint.rs +++ b/crates/relayer/src/chain/endpoint.rs @@ -1,4 +1,5 @@ use alloc::sync::Arc; +use core::convert::TryFrom; use ibc_proto::ibc::apps::fee::v1::{ QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, diff --git a/crates/relayer/src/config.rs b/crates/relayer/src/config.rs index 81de379bcf..6e0fe98347 100644 --- a/crates/relayer/src/config.rs +++ b/crates/relayer/src/config.rs @@ -9,15 +9,20 @@ pub mod proof_specs; pub mod refresh_rate; pub mod types; +use alloc::collections::BTreeMap; use core::{ cmp::Ordering, fmt::{Display, Error as FmtError, Formatter}, str::FromStr, time::Duration, }; -use ibc_relayer_types::core::ics04_channel::packet::Sequence; -use std::{borrow::Cow, collections::BTreeMap}; -use std::{fs, fs::File, io::Write, ops::Range, path::Path}; +use std::{ + borrow::Cow, + fs::{self, File}, + io::Write, + ops::Range, + path::Path, +}; use byte_unit::Byte; pub use error::Error; @@ -25,7 +30,7 @@ pub use filter::PacketFilter; use ibc_proto::google::protobuf::Any; use ibc_relayer_types::{ core::{ - ics23_commitment::specs::ProofSpecs, + ics04_channel::packet::Sequence, ics24_host::identifier::{ChainId, ChannelId, PortId}, }, timestamp::ZERO_DURATION, diff --git a/crates/relayer/src/config/filter.rs b/crates/relayer/src/config/filter.rs index c4b1c6fd6f..5d61983c2d 100644 --- a/crates/relayer/src/config/filter.rs +++ b/crates/relayer/src/config/filter.rs @@ -372,9 +372,10 @@ impl<'de> Deserialize<'de> for ChannelFilterMatch { } pub(crate) mod port { - use super::*; use ibc_relayer_types::core::ics24_host::identifier::PortId; + use super::*; + pub struct PortFilterMatchVisitor; impl<'de> de::Visitor<'de> for PortFilterMatchVisitor { @@ -400,9 +401,10 @@ pub(crate) mod port { } pub(crate) mod channel { - use super::*; use ibc_relayer_types::core::ics24_host::identifier::ChannelId; + use super::*; + pub struct ChannelFilterMatchVisitor; impl<'de> de::Visitor<'de> for ChannelFilterMatchVisitor { diff --git a/crates/relayer/src/event.rs b/crates/relayer/src/event.rs index 2a304b8279..68723227e5 100644 --- a/crates/relayer/src/event.rs +++ b/crates/relayer/src/event.rs @@ -1,7 +1,4 @@ use core::fmt::{Display, Error as FmtError, Formatter}; -use serde::Serialize; -use subtle_encoding::hex; -use tendermint::abci::Event as AbciEvent; use ibc_relayer_types::{ applications::{ @@ -29,6 +26,8 @@ use ibc_relayer_types::{ events::{Error as IbcEventError, IbcEvent, IbcEventType}, Height, }; +use serde::Serialize; +use tendermint::abci::Event as AbciEvent; pub mod bus; pub mod error; diff --git a/crates/relayer/src/link/relay_path.rs b/crates/relayer/src/link/relay_path.rs index f77e58f42c..0bd3f816bd 100644 --- a/crates/relayer/src/link/relay_path.rs +++ b/crates/relayer/src/link/relay_path.rs @@ -1,5 +1,4 @@ use alloc::collections::{BTreeMap as HashMap, VecDeque}; -use ibc_relayer_types::core::ics04_channel::packet::Sequence; use std::{ ops::Sub, time::{Duration, Instant}, @@ -20,7 +19,7 @@ use ibc_relayer_types::{ recv_packet::MsgRecvPacket, timeout::MsgTimeout, timeout_on_close::MsgTimeoutOnClose, }, - packet::{Packet, PacketMsgType}, + packet::{Packet, PacketMsgType, Sequence}, }, ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, }, diff --git a/crates/relayer/src/upgrade_chain.rs b/crates/relayer/src/upgrade_chain.rs index 10554b5c59..d94affbb80 100644 --- a/crates/relayer/src/upgrade_chain.rs +++ b/crates/relayer/src/upgrade_chain.rs @@ -22,7 +22,6 @@ use ibc_relayer_types::{ downcast, Height, }; use tendermint::Hash as TxHash; - use tracing::warn; use crate::{ diff --git a/crates/relayer/src/worker/packet.rs b/crates/relayer/src/worker/packet.rs index 554a55e571..44de4be1ad 100644 --- a/crates/relayer/src/worker/packet.rs +++ b/crates/relayer/src/worker/packet.rs @@ -1,31 +1,37 @@ use core::time::Duration; -use std::borrow::BorrowMut; -use std::sync::{Arc, Mutex}; +use std::{ + borrow::BorrowMut, + sync::{Arc, Mutex}, +}; use crossbeam_channel::Receiver; +use ibc_proto::ibc::{ + apps::fee::v1::{IdentifiedPacketFees, QueryIncentivizedPacketRequest}, + core::channel::v1::PacketId, +}; +use ibc_relayer_types::{ + applications::{ + ics29_fee::events::IncentivizedPacket, + transfer::{Amount, Coin, RawCoin}, + }, + core::ics04_channel::{channel::Ordering, events::WriteAcknowledgement, packet::Sequence}, + events::{IbcEvent, IbcEventType}, + Height, +}; use itertools::Itertools; use moka::sync::Cache; use tracing::{debug, error, error_span, info, trace, warn}; - -use ibc_proto::ibc::apps::fee::v1::{IdentifiedPacketFees, QueryIncentivizedPacketRequest}; -use ibc_proto::ibc::core::channel::v1::PacketId; -use ibc_relayer_types::applications::ics29_fee::events::IncentivizedPacket; -use ibc_relayer_types::applications::transfer::{Amount, Coin, RawCoin}; -use ibc_relayer_types::core::ics04_channel::channel::Ordering; -use ibc_relayer_types::core::ics04_channel::events::WriteAcknowledgement; -use ibc_relayer_types::core::ics04_channel::packet::Sequence; -use ibc_relayer_types::core::ics24_host::identifier::ChannelId; -use ibc_relayer_types::core::ics24_host::identifier::PortId; -use ibc_relayer_types::events::{IbcEvent, IbcEventType}; -use ibc_relayer_types::Height; +#[cfg(feature = "telemetry")] +use { + ibc_relayer_types::core::ics24_host::identifier::ChannelId, + ibc_relayer_types::core::ics24_host::identifier::PortId, +}; use super::{error::RunError, WorkerCmd}; -use crate::chain::requests::QueryHeight; -use crate::event::IbcEventWithHeight; use crate::{ - chain::handle::ChainHandle, + chain::{handle::ChainHandle, requests::QueryHeight}, config::filter::FeePolicy, - event::source::EventBatch, + event::{source::EventBatch, IbcEventWithHeight}, foreign_client::HasExpiredOrFrozenError, link::{error::LinkError, Link, Resubmit}, object::Packet, diff --git a/tools/integration-test/src/mbt/handlers.rs b/tools/integration-test/src/mbt/handlers.rs index 7f0a2ff796..49b2128fe1 100644 --- a/tools/integration-test/src/mbt/handlers.rs +++ b/tools/integration-test/src/mbt/handlers.rs @@ -1,16 +1,4 @@ -use ibc_relayer::util::task::TaskHandle; -use ibc_relayer::worker::client::spawn_refresh_client; - use ibc_relayer::{util::task::TaskHandle, worker::client::spawn_refresh_client}; -use ibc_test_framework::bootstrap::binary::chain::bootstrap_foreign_client_pair; -use ibc_test_framework::bootstrap::binary::connection::bootstrap_connection; -use ibc_test_framework::prelude::*; -use ibc_test_framework::relayer::channel::{assert_eventually_channel_established, init_channel}; -use ibc_test_framework::relayer::connection::{ - assert_eventually_connection_established, init_connection, -}; -use ibc_test_framework::types::binary::client::ClientIdPair; -use ibc_test_framework::types::tagged::mono::Tagged; use ibc_test_framework::{ bootstrap::binary::{chain::bootstrap_foreign_client_pair, connection::bootstrap_connection}, chain::{ext::transfer::ChainTransferMethodsExt, tagged::TaggedChainDriverExt}, diff --git a/tools/integration-test/src/mbt/utils.rs b/tools/integration-test/src/mbt/utils.rs index 03c2680300..3f638fcc12 100644 --- a/tools/integration-test/src/mbt/utils.rs +++ b/tools/integration-test/src/mbt/utils.rs @@ -5,8 +5,6 @@ use ibc_relayer::chain::requests::{ QueryUnreceivedPacketsRequest, }; use ibc_relayer_types::core::ics04_channel::packet::Sequence; -use ibc_test_framework::prelude::*; -use ibc_test_framework::types::tagged::mono::Tagged; use ibc_test_framework::{ibc::denom::Denom, prelude::*, types::tagged::mono::Tagged}; use super::{ diff --git a/tools/integration-test/src/tests/fee/pay_fee_async.rs b/tools/integration-test/src/tests/fee/pay_fee_async.rs index b01a2fa04b..b904170482 100644 --- a/tools/integration-test/src/tests/fee/pay_fee_async.rs +++ b/tools/integration-test/src/tests/fee/pay_fee_async.rs @@ -20,11 +20,7 @@ use std::cmp::max; -use ibc_relayer_types::core::ics04_channel::version::Version; -use ibc_relayer_types::events::IbcEvent; use ibc_relayer_types::{core::ics04_channel::version::Version, events::IbcEvent}; -use ibc_test_framework::prelude::*; -use ibc_test_framework::util::random::random_u128_range; use ibc_test_framework::{prelude::*, util::random::random_u128_range}; #[test] diff --git a/tools/integration-test/src/tests/interchain_security/ica_transfer.rs b/tools/integration-test/src/tests/interchain_security/ica_transfer.rs index 55621013f6..06eb73738f 100644 --- a/tools/integration-test/src/tests/interchain_security/ica_transfer.rs +++ b/tools/integration-test/src/tests/interchain_security/ica_transfer.rs @@ -4,14 +4,6 @@ use std::str::FromStr; use ibc_relayer::{chain::tracking::TrackedMsgs, event::IbcEventWithHeight}; -use ibc_relayer_types::applications::ics27_ica::cosmos_tx::CosmosTx; -use ibc_relayer_types::applications::ics27_ica::packet_data::InterchainAccountPacketData; -use ibc_relayer_types::applications::transfer::msgs::send::MsgSend; -use ibc_relayer_types::applications::transfer::{Amount, Coin}; -use ibc_relayer_types::bigint::U256; -use ibc_relayer_types::signer::Signer; -use ibc_relayer_types::timestamp::Timestamp; -use ibc_relayer_types::tx_msg::Msg; use ibc_relayer_types::{ applications::{ ics27_ica::{ @@ -24,13 +16,6 @@ use ibc_relayer_types::{ timestamp::Timestamp, tx_msg::Msg, }; -use ibc_test_framework::chain::ext::ica::register_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; -use ibc_test_framework::util::interchain_security::{ - interchain_send_tx, update_genesis_for_consumer_chain, update_relayer_config_for_consumer_chain, -}; use ibc_test_framework::{ chain::ext::ica::register_interchain_account, framework::binary::channel::run_binary_interchain_security_channel_test, diff --git a/tools/integration-test/src/tests/manual/simulation.rs b/tools/integration-test/src/tests/manual/simulation.rs index 950c9f2372..6ad421172a 100644 --- a/tools/integration-test/src/tests/manual/simulation.rs +++ b/tools/integration-test/src/tests/manual/simulation.rs @@ -12,8 +12,6 @@ */ use core::time::Duration; -use ibc_relayer::config::{types::MaxMsgNum, ChainConfig}; -use ibc_relayer::transfer::{build_and_send_transfer_messages, TransferOptions}; use ibc_relayer::{ config::{types::MaxMsgNum, ChainConfig, Config}, diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index 63094f6679..446844e053 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -5,7 +5,6 @@ //! `tools/test-framework/src/docs/walkthroughs/memo.rs`. const OVERWRITE_MEMO: &str = "Overwritten memo"; - use ibc_relayer::config::{types::Memo, ChainConfig, Config}; use ibc_test_framework::{ ibc::denom::derive_ibc_denom, diff --git a/tools/integration-test/src/tests/ordered_channel.rs b/tools/integration-test/src/tests/ordered_channel.rs index 147d6f7cea..61fb2d3afc 100644 --- a/tools/integration-test/src/tests/ordered_channel.rs +++ b/tools/integration-test/src/tests/ordered_channel.rs @@ -13,8 +13,6 @@ //! A more thorough walkthrough of this test can be found at //! `tools/test-framework/src/docs/walkthroughs/ordered_channel.rs`. -use ibc_test_framework::prelude::*; -use ibc_test_framework::util::random::random_u128_range; use ibc_test_framework::{ ibc::denom::derive_ibc_denom, prelude::*, util::random::random_u128_range, }; diff --git a/tools/integration-test/src/tests/ordered_channel_clear.rs b/tools/integration-test/src/tests/ordered_channel_clear.rs index 11f3e087a0..96790c33c4 100644 --- a/tools/integration-test/src/tests/ordered_channel_clear.rs +++ b/tools/integration-test/src/tests/ordered_channel_clear.rs @@ -4,8 +4,6 @@ use ibc_relayer::{ transfer::{build_and_send_transfer_messages, TransferOptions}, }; use ibc_relayer_types::events::IbcEvent; -use ibc_test_framework::prelude::*; -use ibc_test_framework::util::random::random_u64_range; use ibc_test_framework::{ ibc::denom::derive_ibc_denom, prelude::*, util::random::random_u64_range, }; diff --git a/tools/test-framework/src/chain/chain_type.rs b/tools/test-framework/src/chain/chain_type.rs index 17990f6724..93de40804b 100644 --- a/tools/test-framework/src/chain/chain_type.rs +++ b/tools/test-framework/src/chain/chain_type.rs @@ -87,7 +87,6 @@ impl ChainType { pk_type: "/injective.crypto.v1beta1.ethsecp256k1.PubKey".to_string(), }, Self::Astria => AddressType::Astria, - Self::Provenance => AddressType::default(), // Self::Penumbra => todo!(), } } diff --git a/tools/test-framework/src/types/single/node.rs b/tools/test-framework/src/types/single/node.rs index d5c0e84a3e..fbd47f286a 100644 --- a/tools/test-framework/src/types/single/node.rs +++ b/tools/test-framework/src/types/single/node.rs @@ -3,11 +3,12 @@ */ use core::{str::FromStr, time::Duration}; -use eyre::eyre; -use eyre::Report as Error; -use std::collections::BTreeMap; -use std::sync::{Arc, RwLock}; +use std::{ + collections::BTreeMap, + sync::{Arc, RwLock}, +}; +use eyre::{eyre, Report as Error}; use ibc_relayer::{ chain::cosmos::config::CosmosSdkConfig, config::{ diff --git a/tools/test-framework/src/util/interchain_security.rs b/tools/test-framework/src/util/interchain_security.rs index 6d42b3eedd..4db14f1b0d 100644 --- a/tools/test-framework/src/util/interchain_security.rs +++ b/tools/test-framework/src/util/interchain_security.rs @@ -1,15 +1,13 @@ -use ibc_relayer::config::ChainConfig; +use ibc_relayer::{chain::tracking::TrackedMsgs, config::ChainConfig, event::IbcEventWithHeight}; +use ibc_relayer_types::{ + applications::ics27_ica::{msgs::send_tx::MsgSendTx, packet_data::InterchainAccountPacketData}, + signer::Signer, + timestamp::Timestamp, + tx_msg::Msg as _, +}; use crate::{chain::config::set_voting_period, prelude::*}; -use ibc_relayer::chain::tracking::TrackedMsgs; -use ibc_relayer::event::IbcEventWithHeight; -use ibc_relayer_types::applications::ics27_ica::msgs::send_tx::MsgSendTx; -use ibc_relayer_types::applications::ics27_ica::packet_data::InterchainAccountPacketData; -use ibc_relayer_types::signer::Signer; -use ibc_relayer_types::timestamp::Timestamp; -use ibc_relayer_types::tx_msg::Msg; - pub fn update_genesis_for_consumer_chain(genesis: &mut serde_json::Value) -> Result<(), Error> { // Consumer chain doesn't have a gov key. if genesis