From 06dfbafb4893255a79043ec4032034a83ebd53df Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Tue, 12 Mar 2024 18:03:59 +0100 Subject: [PATCH] Release v1.8.2 (#3891) * Bump version to 1.8.2 * Fix warnings on latest nightly * Create v1.8.2 changelog * Rephrase changelog summary * Reword changelog * Update CHANGELOG.md Co-authored-by: Luca Joss Signed-off-by: Romain Ruetschi --- .../3889-clear-packet-cli-fix.md | 0 .../ibc-relayer/3880-health-check-fix.md | 0 .../3887-test-with-injective.md | 0 .../ibc-relayer/3864-handshake-retry.md | 0 .changelog/v1.8.2/summary.md | 6 ++++ CHANGELOG.md | 32 +++++++++++++++++++ Cargo.lock | 16 +++++----- crates/chain-registry/Cargo.toml | 4 +-- crates/chain-registry/src/error.rs | 7 ++-- crates/chain-registry/src/formatter.rs | 8 +++-- crates/relayer-cli/Cargo.toml | 12 +++---- crates/relayer-cli/src/application.rs | 2 +- crates/relayer-cli/src/bin/hermes/main.rs | 2 +- crates/relayer-cli/src/chain_registry.rs | 11 +++---- .../src/commands/config/validate.rs | 1 - .../src/commands/create/channel.rs | 3 +- .../src/commands/create/connection.rs | 1 - crates/relayer-cli/src/commands/evidence.rs | 1 - .../relayer-cli/src/commands/fee/transfer.rs | 4 +-- crates/relayer-cli/src/commands/health.rs | 1 - crates/relayer-cli/src/commands/listen.rs | 2 +- crates/relayer-cli/src/commands/logs/reset.rs | 1 - .../relayer-cli/src/commands/misbehaviour.rs | 2 +- .../relayer-cli/src/commands/query/channel.rs | 1 - .../src/commands/query/channel_ends.rs | 1 - .../src/commands/query/channels.rs | 1 - .../relayer-cli/src/commands/query/clients.rs | 1 - .../src/commands/query/connection.rs | 1 - .../src/commands/query/connections.rs | 1 - .../src/commands/query/packet/ack.rs | 1 - .../src/commands/query/packet/acks.rs | 1 - .../src/commands/query/packet/commitment.rs | 3 +- .../src/commands/query/packet/commitments.rs | 1 - .../src/commands/query/packet/pending.rs | 1 - .../src/commands/query/packet/pending_acks.rs | 1 - .../commands/query/packet/pending_sends.rs | 1 - crates/relayer-cli/src/commands/start.rs | 1 - crates/relayer-cli/src/commands/tx/channel.rs | 1 - .../relayer-cli/src/commands/tx/connection.rs | 1 - crates/relayer-cli/src/commands/tx/packet.rs | 1 - .../relayer-cli/src/commands/tx/transfer.rs | 2 +- crates/relayer-cli/src/commands/tx/upgrade.rs | 1 - crates/relayer-cli/src/conclude.rs | 6 ++-- crates/relayer-cli/src/entry.rs | 2 -- crates/relayer-cli/src/lib.rs | 7 +--- crates/relayer-cli/src/prelude.rs | 1 + crates/relayer-cli/tests/acceptance.rs | 8 +---- crates/relayer-rest/Cargo.toml | 6 ++-- crates/relayer-rest/tests/mock.rs | 2 +- crates/relayer-types/Cargo.toml | 2 +- .../applications/ics27_ica/msgs/register.rs | 8 ++--- .../src/applications/transfer/packet.rs | 2 -- .../clients/ics07_tendermint/client_state.rs | 1 - .../src/core/ics02_client/client_state.rs | 1 - .../src/core/ics02_client/consensus_state.rs | 1 - .../src/core/ics02_client/trust_threshold.rs | 1 - .../ics03_connection/msgs/conn_open_try.rs | 6 +--- .../src/core/ics04_channel/packet_id.rs | 1 - .../src/core/ics23_commitment/commitment.rs | 2 +- .../src/core/ics23_commitment/merkle.rs | 2 +- .../src/core/ics24_host/identifier.rs | 2 +- .../relayer-types/src/core/ics24_host/path.rs | 1 - crates/relayer-types/src/events.rs | 1 - crates/relayer-types/src/lib.rs | 4 +-- crates/relayer-types/src/mock/header.rs | 1 - crates/relayer-types/src/utils/pretty.rs | 2 +- crates/relayer/Cargo.toml | 8 ++--- crates/relayer/src/chain/cosmos.rs | 11 ++----- crates/relayer/src/chain/cosmos/encode.rs | 10 +++--- .../relayer/src/chain/cosmos/query/custom.rs | 3 +- crates/relayer/src/chain/endpoint.rs | 1 - crates/relayer/src/chain/requests.rs | 4 +-- crates/relayer/src/chain/runtime.rs | 1 - crates/relayer/src/config.rs | 2 +- crates/relayer/src/config/filter.rs | 3 -- crates/relayer/src/event.rs | 1 - crates/relayer/src/event/source/websocket.rs | 5 ++- .../src/event/source/websocket/extract.rs | 1 - crates/relayer/src/extension_options.rs | 2 +- .../src/keyring/any_signing_key_pair.rs | 2 +- crates/relayer/src/lib.rs | 3 +- crates/relayer/src/link/cli.rs | 1 - crates/relayer/src/link/pending.rs | 1 - crates/relayer/src/util/profiling.rs | 2 +- crates/relayer/src/worker/packet.rs | 2 +- crates/telemetry/Cargo.toml | 4 +-- guide/README.md | 2 +- tools/integration-test/Cargo.toml | 2 +- .../src/bin/test_setup_with_binary_channel.rs | 2 +- ...t_setup_with_fee_enabled_binary_channel.rs | 2 +- .../bin/test_setup_with_ternary_channel.rs | 2 +- tools/integration-test/src/mbt/handlers.rs | 4 --- tools/integration-test/src/mbt/utils.rs | 4 --- .../src/tests/client_expiration.rs | 6 +--- .../src/tests/client_filter.rs | 2 -- .../src/tests/client_refresh.rs | 2 -- .../src/tests/client_settings.rs | 2 -- .../src/tests/connection_delay.rs | 2 -- .../src/tests/consensus_states.rs | 2 -- .../integration-test/src/tests/denom_trace.rs | 1 - .../src/tests/forward/forward_hop_transfer.rs | 2 +- .../src/tests/forward/forward_transfer.rs | 2 +- tools/integration-test/src/tests/ica.rs | 2 -- .../src/tests/manual/simulation.rs | 3 +- tools/integration-test/src/tests/memo.rs | 3 +- .../src/tests/ordered_channel.rs | 1 - .../src/tests/ordered_channel_clear.rs | 1 - .../integration-test/src/tests/supervisor.rs | 3 +- .../src/tests/ternary_transfer.rs | 1 - tools/test-framework/Cargo.toml | 8 ++--- .../test-framework/src/bootstrap/consumer.rs | 1 - .../src/bootstrap/nary/chain.rs | 1 - .../src/bootstrap/nary/channel.rs | 1 - .../src/bootstrap/nary/connection.rs | 1 - tools/test-framework/src/bootstrap/single.rs | 1 - .../test-framework/src/chain/ext/async_icq.rs | 2 -- .../test-framework/src/chain/ext/bootstrap.rs | 1 - tools/test-framework/src/chain/ext/ica.rs | 4 --- tools/test-framework/src/error.rs | 1 - .../src/framework/binary/node.rs | 2 -- tools/test-framework/src/types/env.rs | 1 - tools/test-framework/src/types/nary/chains.rs | 1 - .../test-framework/src/types/nary/channel.rs | 1 - .../src/types/nary/connection.rs | 1 - .../src/types/nary/foreign_client.rs | 1 - tools/test-framework/src/types/tagged/dual.rs | 3 +- tools/test-framework/src/types/tagged/mono.rs | 3 +- tools/test-framework/src/util/array.rs | 1 - 128 files changed, 138 insertions(+), 225 deletions(-) rename .changelog/{unreleased => v1.8.2}/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md (100%) rename .changelog/{unreleased => v1.8.2}/bug-fixes/ibc-relayer/3880-health-check-fix.md (100%) rename .changelog/{unreleased => v1.8.2}/features/ibc-integration-test/3887-test-with-injective.md (100%) rename .changelog/{unreleased => v1.8.2}/improvements/ibc-relayer/3864-handshake-retry.md (100%) create mode 100644 .changelog/v1.8.2/summary.md diff --git a/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md b/.changelog/v1.8.2/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md similarity index 100% rename from .changelog/unreleased/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md rename to .changelog/v1.8.2/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md diff --git a/.changelog/unreleased/bug-fixes/ibc-relayer/3880-health-check-fix.md b/.changelog/v1.8.2/bug-fixes/ibc-relayer/3880-health-check-fix.md similarity index 100% rename from .changelog/unreleased/bug-fixes/ibc-relayer/3880-health-check-fix.md rename to .changelog/v1.8.2/bug-fixes/ibc-relayer/3880-health-check-fix.md diff --git a/.changelog/unreleased/features/ibc-integration-test/3887-test-with-injective.md b/.changelog/v1.8.2/features/ibc-integration-test/3887-test-with-injective.md similarity index 100% rename from .changelog/unreleased/features/ibc-integration-test/3887-test-with-injective.md rename to .changelog/v1.8.2/features/ibc-integration-test/3887-test-with-injective.md diff --git a/.changelog/unreleased/improvements/ibc-relayer/3864-handshake-retry.md b/.changelog/v1.8.2/improvements/ibc-relayer/3864-handshake-retry.md similarity index 100% rename from .changelog/unreleased/improvements/ibc-relayer/3864-handshake-retry.md rename to .changelog/v1.8.2/improvements/ibc-relayer/3864-handshake-retry.md diff --git a/.changelog/v1.8.2/summary.md b/.changelog/v1.8.2/summary.md new file mode 100644 index 0000000000..fba1f2ac82 --- /dev/null +++ b/.changelog/v1.8.2/summary.md @@ -0,0 +1,6 @@ +*March 12th, 2024* + +This release fixes the two following bugs and improves the connection and channel handshake retry mechanism: + +* Fix erroneous warnings for incompatible version of IBC-Go during health checks, ensuring accurate compatibility reporting +* Fix a bug in the `clear packets` command which caused packet clearing to fail with an "counterparty channel not found" error diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6754dbcc..cdd396a273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # CHANGELOG +## v1.8.2 + +*March 12th, 2024* + +This release fixes the two following bugs and improves the connection and channel handshake retry mechanism: + +* Fix erroneous warnings for incompatible version of IBC-Go during health checks, ensuring accurate compatibility reporting +* Fix a bug in the `clear packets` command which caused packet clearing to fail with an "counterparty channel not found" error + +### BUG FIXES + +- [Relayer CLI](relayer-cli) + - Correctly use the counterparty channel and port IDs when clearing the packets + from the destination chain to the source chain in the `packet clear` command + ([\#3889](https://github.com/informalsystems/hermes/issues/3889)) +- [Relayer](relayer) + - Fix parsing of IBC-Go version in health check and improve health check + reporting ([\#3880](https://github.com/informalsystems/hermes/issues/3880)) + +### FEATURES + +- [Integration Test Framework](tools/test-framework) + - Add Injective chain to the chains running the integration tests in the CI. + ([\#3887](https://github.com/informalsystems/hermes/issues/3887)) + +### IMPROVEMENTS + +- [Relayer](relayer) + - Change connection and channel handshake retry strategy + to retry at most 10 times (5 times per block max) + ([\#3864](https://github.com/informalsystems/hermes/issues/3864)) + ## v1.8.1 *March 7th, 2024* diff --git a/Cargo.lock b/Cargo.lock index bad4eb9f6f..11893755c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "ibc-chain-registry" -version = "0.27.1" +version = "0.27.2" dependencies = [ "async-trait", "flex-error", @@ -1463,7 +1463,7 @@ dependencies = [ [[package]] name = "ibc-integration-test" -version = "0.27.1" +version = "0.27.2" dependencies = [ "byte-unit", "http", @@ -1501,7 +1501,7 @@ dependencies = [ [[package]] name = "ibc-relayer" -version = "0.27.1" +version = "0.27.2" dependencies = [ "anyhow", "async-stream", @@ -1570,7 +1570,7 @@ dependencies = [ [[package]] name = "ibc-relayer-cli" -version = "1.8.1" +version = "1.8.2" dependencies = [ "abscissa_core", "clap", @@ -1611,7 +1611,7 @@ dependencies = [ [[package]] name = "ibc-relayer-rest" -version = "0.27.1" +version = "0.27.2" dependencies = [ "axum", "crossbeam-channel 0.5.11", @@ -1626,7 +1626,7 @@ dependencies = [ [[package]] name = "ibc-relayer-types" -version = "0.27.1" +version = "0.27.2" dependencies = [ "bytes", "derive_more", @@ -1657,7 +1657,7 @@ dependencies = [ [[package]] name = "ibc-telemetry" -version = "0.27.1" +version = "0.27.2" dependencies = [ "axum", "dashmap", @@ -1676,7 +1676,7 @@ dependencies = [ [[package]] name = "ibc-test-framework" -version = "0.27.1" +version = "0.27.2" dependencies = [ "color-eyre", "crossbeam-channel 0.5.11", diff --git a/crates/chain-registry/Cargo.toml b/crates/chain-registry/Cargo.toml index c94f48d8fd..3207ec5c86 100644 --- a/crates/chain-registry/Cargo.toml +++ b/crates/chain-registry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-chain-registry" -version = "0.27.1" +version = "0.27.2" edition = "2021" license = "Apache-2.0" keywords = ["cosmos", "ibc", "relayer", "chain", "registry"] @@ -12,7 +12,7 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types" } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } ibc-proto = { version = "0.42.0", features = ["serde"] } tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } diff --git a/crates/chain-registry/src/error.rs b/crates/chain-registry/src/error.rs index 662ce5cbab..e64f3d267c 100644 --- a/crates/chain-registry/src/error.rs +++ b/crates/chain-registry/src/error.rs @@ -1,10 +1,7 @@ +use std::path::PathBuf; + use flex_error::{define_error, TraceError}; -use http; use itertools::Itertools; -use reqwest; -use serde_json; -use std::path::PathBuf; -use tendermint_rpc; use tokio::task::JoinError; use tokio::time::error::Elapsed; diff --git a/crates/chain-registry/src/formatter.rs b/crates/chain-registry/src/formatter.rs index 88b4227f7a..5d97832703 100644 --- a/crates/chain-registry/src/formatter.rs +++ b/crates/chain-registry/src/formatter.rs @@ -2,13 +2,16 @@ //! 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 crate::error::RegistryError; + +use std::str::FromStr; + use http::uri::Scheme; use http::Uri; -use std::str::FromStr; use tendermint_rpc::Url; +use crate::error::RegistryError; + /// `UriFormatter` contains the basic expectations to parse a valid URL from a `&str`. pub trait UriFormatter { /// Expected output format of the formatter. @@ -98,7 +101,6 @@ impl UriFormatter for SimpleGrpcFormatter { mod tests { use super::*; - use std::cmp::PartialEq; use std::fmt::Debug; struct FormatterTest { diff --git a/crates/relayer-cli/Cargo.toml b/crates/relayer-cli/Cargo.toml index b673a30e81..6a90246bf7 100644 --- a/crates/relayer-cli/Cargo.toml +++ b/crates/relayer-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-cli" -version = "1.8.1" +version = "1.8.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -25,11 +25,11 @@ telemetry = ["ibc-relayer/telemetry", "ibc-telemetry"] rest-server = ["ibc-relayer-rest"] [dependencies] -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types" } -ibc-relayer = { version = "0.27.1", path = "../relayer" } -ibc-telemetry = { version = "0.27.1", path = "../telemetry", optional = true } -ibc-relayer-rest = { version = "0.27.1", path = "../relayer-rest", optional = true } -ibc-chain-registry = { version = "0.27.1" , path = "../chain-registry" } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } +ibc-relayer = { version = "0.27.2", path = "../relayer" } +ibc-telemetry = { version = "0.27.2", path = "../telemetry", optional = true } +ibc-relayer-rest = { version = "0.27.2", path = "../relayer-rest", optional = true } +ibc-chain-registry = { version = "0.27.2" , path = "../chain-registry" } clap = { version = "3.2", features = ["cargo"] } clap_complete = "3.2" diff --git a/crates/relayer-cli/src/application.rs b/crates/relayer-cli/src/application.rs index e7d524bf96..a6b9c656e0 100644 --- a/crates/relayer-cli/src/application.rs +++ b/crates/relayer-cli/src/application.rs @@ -166,7 +166,7 @@ impl Application for CliApp { let terminal = Terminal::new(self.term_colors(command)); let config_path = command.config_path(); - self.config_path = config_path.clone(); + self.config_path.clone_from(&config_path); let config = config_path .map(|path| self.load_config(&path)) diff --git a/crates/relayer-cli/src/bin/hermes/main.rs b/crates/relayer-cli/src/bin/hermes/main.rs index 4cdb1744fc..214fbb6ab5 100644 --- a/crates/relayer-cli/src/bin/hermes/main.rs +++ b/crates/relayer-cli/src/bin/hermes/main.rs @@ -1,6 +1,6 @@ //! Main entry point for Cli -#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)] +#![deny(warnings, missing_docs, trivial_casts)] #![forbid(unsafe_code)] use ibc_relayer_cli::application::APPLICATION; diff --git a/crates/relayer-cli/src/chain_registry.rs b/crates/relayer-cli/src/chain_registry.rs index 717bf10bae..9745312194 100644 --- a/crates/relayer-cli/src/chain_registry.rs +++ b/crates/relayer-cli/src/chain_registry.rs @@ -1,12 +1,12 @@ //! Contains functions to generate a relayer config for a given chain -use futures::future::join_all; -use http::Uri; -use ibc_relayer::config::dynamic_gas::DynamicGasPrice; use std::collections::BTreeMap; use std::collections::HashMap; use std::fmt::Display; -use std::marker::Send; + +use futures::future::join_all; +use http::Uri; +use tendermint_rpc::Url; use tokio::task::{JoinError, JoinHandle}; use tracing::{error, trace}; @@ -18,14 +18,13 @@ use ibc_chain_registry::formatter::{SimpleGrpcFormatter, UriFormatter}; use ibc_chain_registry::paths::IBCPath; use ibc_chain_registry::querier::*; use ibc_relayer::chain::cosmos::config::CosmosSdkConfig; +use ibc_relayer::config::dynamic_gas::DynamicGasPrice; use ibc_relayer::config::filter::{FilterPattern, PacketFilter}; use ibc_relayer::config::gas_multiplier::GasMultiplier; use ibc_relayer::config::types::{MaxMsgNum, MaxTxSize, Memo, TrustThreshold}; use ibc_relayer::config::{default, AddressType, ChainConfig, EventSourceMode, GasPrice}; use ibc_relayer::keyring::Store; -use tendermint_rpc::Url; - 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/config/validate.rs b/crates/relayer-cli/src/commands/config/validate.rs index 03efaf018c..1be5e3f78c 100644 --- a/crates/relayer-cli/src/commands/config/validate.rs +++ b/crates/relayer-cli/src/commands/config/validate.rs @@ -1,7 +1,6 @@ use std::fs; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use crate::conclude::Output; use crate::config; diff --git a/crates/relayer-cli/src/commands/create/channel.rs b/crates/relayer-cli/src/commands/create/channel.rs index 98b8464ff3..2295d09e6c 100644 --- a/crates/relayer-cli/src/commands/create/channel.rs +++ b/crates/relayer-cli/src/commands/create/channel.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use console::style; use dialoguer::Confirm; @@ -9,6 +8,7 @@ use ibc_relayer::chain::requests::{ IncludeProof, QueryClientStateRequest, QueryConnectionRequest, QueryHeight, }; use ibc_relayer::channel::Channel; +use ibc_relayer::config::default::connection_delay; use ibc_relayer::connection::Connection; use ibc_relayer::foreign_client::ForeignClient; use ibc_relayer_types::core::ics03_connection::connection::IdentifiedConnectionEnd; @@ -19,7 +19,6 @@ use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ConnectionId, Por use crate::cli_utils::{spawn_chain_runtime, ChainHandlePair}; use crate::conclude::{exit_with_unrecoverable_error, Output}; use crate::prelude::*; -use ibc_relayer::config::default::connection_delay; static PROMPT: &str = "Are you sure you want a new connection & clients to be created? Hermes will use default security parameters."; static HINT: &str = "Consider using the default invocation\n\nhermes create channel --a-port --b-port --a-chain --a-connection \n\nto reuse a pre-existing connection."; diff --git a/crates/relayer-cli/src/commands/create/connection.rs b/crates/relayer-cli/src/commands/create/connection.rs index 052411d069..e6d5982c25 100644 --- a/crates/relayer-cli/src/commands/create/connection.rs +++ b/crates/relayer-cli/src/commands/create/connection.rs @@ -1,7 +1,6 @@ use core::time::Duration; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{IncludeProof, QueryClientStateRequest, QueryHeight}; diff --git a/crates/relayer-cli/src/commands/evidence.rs b/crates/relayer-cli/src/commands/evidence.rs index eb3bc9afe8..c034d7318e 100644 --- a/crates/relayer-cli/src/commands/evidence.rs +++ b/crates/relayer-cli/src/commands/evidence.rs @@ -5,7 +5,6 @@ use std::thread::sleep; use std::time::Duration; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::config::{ChainConfig, Config}; use tokio::runtime::Runtime as TokioRuntime; diff --git a/crates/relayer-cli/src/commands/fee/transfer.rs b/crates/relayer-cli/src/commands/fee/transfer.rs index 3893a2d232..2ea80d63b3 100644 --- a/crates/relayer-cli/src/commands/fee/transfer.rs +++ b/crates/relayer-cli/src/commands/fee/transfer.rs @@ -1,8 +1,6 @@ use core::time::Duration; -use abscissa_core::{ - clap::Parser, config::Override, Command, FrameworkError, FrameworkErrorKind, Runnable, -}; +use abscissa_core::{clap::Parser, config::Override, FrameworkError, FrameworkErrorKind}; use eyre::eyre; use ibc_relayer::{ diff --git a/crates/relayer-cli/src/commands/health.rs b/crates/relayer-cli/src/commands/health.rs index 8514bb087f..6ecdd588dd 100644 --- a/crates/relayer-cli/src/commands/health.rs +++ b/crates/relayer-cli/src/commands/health.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::endpoint::HealthCheck::*; use ibc_relayer::chain::handle::ChainHandle; diff --git a/crates/relayer-cli/src/commands/listen.rs b/crates/relayer-cli/src/commands/listen.rs index 68bd5c22ad..485264e84e 100644 --- a/crates/relayer-cli/src/commands/listen.rs +++ b/crates/relayer-cli/src/commands/listen.rs @@ -5,8 +5,8 @@ use core::{ }; use std::thread; +use abscissa_core::application::fatal_error; use abscissa_core::clap::Parser; -use abscissa_core::{application::fatal_error, Runnable}; use eyre::eyre; use itertools::Itertools; use tendermint_rpc::{client::CompatMode, Client, HttpClient}; diff --git a/crates/relayer-cli/src/commands/logs/reset.rs b/crates/relayer-cli/src/commands/logs/reset.rs index e216af3c32..f9165b9da1 100644 --- a/crates/relayer-cli/src/commands/logs/reset.rs +++ b/crates/relayer-cli/src/commands/logs/reset.rs @@ -1,6 +1,5 @@ use abscissa_core::clap::Parser; use abscissa_core::Command; -use abscissa_core::Runnable; use crate::components::default_directive; use crate::prelude::*; diff --git a/crates/relayer-cli/src/commands/misbehaviour.rs b/crates/relayer-cli/src/commands/misbehaviour.rs index 8400d11ad9..a231c7c1bc 100644 --- a/crates/relayer-cli/src/commands/misbehaviour.rs +++ b/crates/relayer-cli/src/commands/misbehaviour.rs @@ -1,5 +1,5 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; +use abscissa_core::Command; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{IncludeProof, QueryClientStateRequest, QueryHeight}; use ibc_relayer::config::Config; diff --git a/crates/relayer-cli/src/commands/query/channel.rs b/crates/relayer-cli/src/commands/query/channel.rs index f350ea8dd6..14b402d3dc 100644 --- a/crates/relayer-cli/src/commands/query/channel.rs +++ b/crates/relayer-cli/src/commands/query/channel.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{IncludeProof, QueryChannelRequest, QueryHeight}; diff --git a/crates/relayer-cli/src/commands/query/channel_ends.rs b/crates/relayer-cli/src/commands/query/channel_ends.rs index aaa668beb1..bc316865ab 100644 --- a/crates/relayer-cli/src/commands/query/channel_ends.rs +++ b/crates/relayer-cli/src/commands/query/channel_ends.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use serde::{Deserialize, Serialize}; use eyre::eyre; diff --git a/crates/relayer-cli/src/commands/query/channels.rs b/crates/relayer-cli/src/commands/query/channels.rs index a516854416..88d85fe103 100644 --- a/crates/relayer-cli/src/commands/query/channels.rs +++ b/crates/relayer-cli/src/commands/query/channels.rs @@ -1,7 +1,6 @@ use core::fmt::{Debug, Error, Formatter}; use abscissa_core::clap::Parser; -use abscissa_core::Runnable; use serde::Serialize; use eyre::eyre; diff --git a/crates/relayer-cli/src/commands/query/clients.rs b/crates/relayer-cli/src/commands/query/clients.rs index 0ced719b2b..e852636801 100644 --- a/crates/relayer-cli/src/commands/query/clients.rs +++ b/crates/relayer-cli/src/commands/query/clients.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::handle::ChainHandle; use serde::Serialize; diff --git a/crates/relayer-cli/src/commands/query/connection.rs b/crates/relayer-cli/src/commands/query/connection.rs index 28b044985d..0dbf675bb7 100644 --- a/crates/relayer-cli/src/commands/query/connection.rs +++ b/crates/relayer-cli/src/commands/query/connection.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{ IncludeProof, PageRequest, QueryConnectionChannelsRequest, QueryConnectionRequest, QueryHeight, diff --git a/crates/relayer-cli/src/commands/query/connections.rs b/crates/relayer-cli/src/commands/query/connections.rs index dadef9d6a2..69aa86526a 100644 --- a/crates/relayer-cli/src/commands/query/connections.rs +++ b/crates/relayer-cli/src/commands/query/connections.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::Runnable; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{ diff --git a/crates/relayer-cli/src/commands/query/packet/ack.rs b/crates/relayer-cli/src/commands/query/packet/ack.rs index 93c59d1efc..86fbb65361 100644 --- a/crates/relayer-cli/src/commands/query/packet/ack.rs +++ b/crates/relayer-cli/src/commands/query/packet/ack.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::requests::{IncludeProof, QueryHeight, QueryPacketAcknowledgementRequest}; use subtle_encoding::{Encoding, Hex}; diff --git a/crates/relayer-cli/src/commands/query/packet/acks.rs b/crates/relayer-cli/src/commands/query/packet/acks.rs index f7e85156dc..9d7a0c4f2e 100644 --- a/crates/relayer-cli/src/commands/query/packet/acks.rs +++ b/crates/relayer-cli/src/commands/query/packet/acks.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::counterparty::acknowledgements_on_chain; use ibc_relayer::chain::handle::BaseChainHandle; diff --git a/crates/relayer-cli/src/commands/query/packet/commitment.rs b/crates/relayer-cli/src/commands/query/packet/commitment.rs index 74779dd5a1..57a45282f1 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitment.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitment.rs @@ -1,10 +1,9 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; -use ibc_relayer::chain::requests::{IncludeProof, QueryHeight, QueryPacketCommitmentRequest}; use serde::Serialize; use subtle_encoding::{Encoding, Hex}; use ibc_relayer::chain::handle::ChainHandle; +use ibc_relayer::chain::requests::{IncludeProof, QueryHeight, QueryPacketCommitmentRequest}; use ibc_relayer_types::core::ics04_channel::packet::Sequence; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId}; use ibc_relayer_types::Height; diff --git a/crates/relayer-cli/src/commands/query/packet/commitments.rs b/crates/relayer-cli/src/commands/query/packet/commitments.rs index a308e5b83d..4ab40143da 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitments.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitments.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::counterparty::commitments_on_chain; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId}; diff --git a/crates/relayer-cli/src/commands/query/packet/pending.rs b/crates/relayer-cli/src/commands/query/packet/pending.rs index 73a1781b5c..188379969b 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending.rs @@ -1,7 +1,6 @@ use core::fmt; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use serde::Serialize; use ibc_relayer::chain::counterparty::{ diff --git a/crates/relayer-cli/src/commands/query/packet/pending_acks.rs b/crates/relayer-cli/src/commands/query/packet/pending_acks.rs index ea5288dbbc..d946a32422 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending_acks.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending_acks.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::counterparty::unreceived_acknowledgements; use ibc_relayer::chain::handle::BaseChainHandle; diff --git a/crates/relayer-cli/src/commands/query/packet/pending_sends.rs b/crates/relayer-cli/src/commands/query/packet/pending_sends.rs index 8d305e496e..c83576f7da 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending_sends.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending_sends.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::counterparty::unreceived_packets; use ibc_relayer::chain::handle::BaseChainHandle; diff --git a/crates/relayer-cli/src/commands/start.rs b/crates/relayer-cli/src/commands/start.rs index 5f0346d211..a102e66c0c 100644 --- a/crates/relayer-cli/src/commands/start.rs +++ b/crates/relayer-cli/src/commands/start.rs @@ -4,7 +4,6 @@ use std::error::Error; use std::io; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use crossbeam_channel::Sender; use ibc_relayer::chain::handle::{CachingChainHandle, ChainHandle}; diff --git a/crates/relayer-cli/src/commands/tx/channel.rs b/crates/relayer-cli/src/commands/tx/channel.rs index 0531c85dfe..84b93a2e49 100644 --- a/crates/relayer-cli/src/commands/tx/channel.rs +++ b/crates/relayer-cli/src/commands/tx/channel.rs @@ -1,7 +1,6 @@ #![allow(clippy::redundant_closure_call)] use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{IncludeProof, QueryConnectionRequest, QueryHeight}; diff --git a/crates/relayer-cli/src/commands/tx/connection.rs b/crates/relayer-cli/src/commands/tx/connection.rs index fb88a61d2e..20f602e5f7 100644 --- a/crates/relayer-cli/src/commands/tx/connection.rs +++ b/crates/relayer-cli/src/commands/tx/connection.rs @@ -1,7 +1,6 @@ #![allow(clippy::redundant_closure_call)] use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::connection::{Connection, ConnectionSide}; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId, ConnectionId}; diff --git a/crates/relayer-cli/src/commands/tx/packet.rs b/crates/relayer-cli/src/commands/tx/packet.rs index 898f4e5832..89fc8d6aa7 100644 --- a/crates/relayer-cli/src/commands/tx/packet.rs +++ b/crates/relayer-cli/src/commands/tx/packet.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer_types::core::ics02_client::height::Height; use std::ops::RangeInclusive; diff --git a/crates/relayer-cli/src/commands/tx/transfer.rs b/crates/relayer-cli/src/commands/tx/transfer.rs index 66b14026ae..62c3d96625 100644 --- a/crates/relayer-cli/src/commands/tx/transfer.rs +++ b/crates/relayer-cli/src/commands/tx/transfer.rs @@ -1,7 +1,7 @@ use core::time::Duration; use abscissa_core::clap::Parser; -use abscissa_core::{config::Override, Command, FrameworkErrorKind, Runnable}; +use abscissa_core::{config::Override, FrameworkErrorKind}; use eyre::eyre; use ibc_relayer::{ diff --git a/crates/relayer-cli/src/commands/tx/upgrade.rs b/crates/relayer-cli/src/commands/tx/upgrade.rs index c56a60832c..d41bf6ce1e 100644 --- a/crates/relayer-cli/src/commands/tx/upgrade.rs +++ b/crates/relayer-cli/src/commands/tx/upgrade.rs @@ -1,7 +1,6 @@ use core::time::Duration; use abscissa_core::clap::Parser; -use abscissa_core::{Command, Runnable}; use ibc_relayer::upgrade_chain::requires_legacy_upgrade_proposal; use ibc_relayer::upgrade_chain::{build_and_send_ibc_upgrade_proposal, UpgradePlanOptions}; diff --git a/crates/relayer-cli/src/conclude.rs b/crates/relayer-cli/src/conclude.rs index 41b45d8cbb..f2190ceb42 100644 --- a/crates/relayer-cli/src/conclude.rs +++ b/crates/relayer-cli/src/conclude.rs @@ -171,7 +171,7 @@ impl Output { /// Builder-style method for attaching a result to an output object. pub fn with_result(mut self, result: R) -> Self where - R: Serialize + core::fmt::Debug + 'static, + R: Serialize + fmt::Debug + 'static, { if json() { self.result = Result::Json(serialize_result(result)); @@ -192,7 +192,7 @@ impl Output { /// input `result`. pub fn success(result: R) -> Self where - R: Serialize + core::fmt::Debug + 'static, + R: Serialize + fmt::Debug + 'static, { Output::with_success().with_result(result) } @@ -236,7 +236,7 @@ impl Output { } /// Helper to serialize a result into a `serde_json::Value`. -fn serialize_result(res: impl Serialize + core::fmt::Debug) -> serde_json::Value { +fn serialize_result(res: impl Serialize + fmt::Debug) -> serde_json::Value { let last_resort = format!("{res:#?}"); match serde_json::to_value(res) { diff --git a/crates/relayer-cli/src/entry.rs b/crates/relayer-cli/src/entry.rs index 1ffa17bc3e..29fa21c0da 100644 --- a/crates/relayer-cli/src/entry.rs +++ b/crates/relayer-cli/src/entry.rs @@ -1,5 +1,3 @@ -#![allow(unused_qualifications)] // Fix for warning in `ValueEnum` generated code - //! Definition of the entrypoint for the Hermes CLI. use std::path::PathBuf; diff --git a/crates/relayer-cli/src/lib.rs b/crates/relayer-cli/src/lib.rs index ff28651be7..5185118d69 100644 --- a/crates/relayer-cli/src/lib.rs +++ b/crates/relayer-cli/src/lib.rs @@ -13,12 +13,7 @@ // Tip: Deny warnings with `RUSTFLAGS="-D warnings"` environment variable in CI #![forbid(unsafe_code)] -#![deny( - rust_2018_idioms, - trivial_casts, - unused_lifetimes, - unused_qualifications -)] +#![deny(rust_2018_idioms, trivial_casts, unused_lifetimes)] #![allow(deprecated)] extern crate alloc; diff --git a/crates/relayer-cli/src/prelude.rs b/crates/relayer-cli/src/prelude.rs index fac61533bc..8108fee094 100644 --- a/crates/relayer-cli/src/prelude.rs +++ b/crates/relayer-cli/src/prelude.rs @@ -6,6 +6,7 @@ /// Abscissa core prelude pub use abscissa_core::prelude::*; +pub use abscissa_core::Command; /// Application state accessors pub use crate::application::{app_config, app_reader}; diff --git a/crates/relayer-cli/tests/acceptance.rs b/crates/relayer-cli/tests/acceptance.rs index c50c4b0866..208164e0bf 100644 --- a/crates/relayer-cli/tests/acceptance.rs +++ b/crates/relayer-cli/tests/acceptance.rs @@ -10,13 +10,7 @@ // Tip: Deny warnings with `RUSTFLAGS="-D warnings"` environment variable in CI #![forbid(unsafe_code)] -#![warn( - missing_docs, - rust_2018_idioms, - trivial_casts, - unused_lifetimes, - unused_qualifications -)] +#![warn(missing_docs, rust_2018_idioms, trivial_casts, unused_lifetimes)] use abscissa_core::testing::prelude::*; use once_cell::sync::Lazy; diff --git a/crates/relayer-rest/Cargo.toml b/crates/relayer-rest/Cargo.toml index dcfb9f0098..1c4655b065 100644 --- a/crates/relayer-rest/Cargo.toml +++ b/crates/relayer-rest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-rest" -version = "0.27.1" +version = "0.27.2" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" @@ -14,8 +14,8 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types" } -ibc-relayer = { version = "0.27.1", path = "../relayer" } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } +ibc-relayer = { version = "0.27.2", path = "../relayer" } crossbeam-channel = "0.5" serde = "1.0" diff --git a/crates/relayer-rest/tests/mock.rs b/crates/relayer-rest/tests/mock.rs index 650774c9ee..c26a225215 100644 --- a/crates/relayer-rest/tests/mock.rs +++ b/crates/relayer-rest/tests/mock.rs @@ -64,7 +64,7 @@ async fn version() { let rest_api_version = VersionInfo { name: "ibc-relayer-rest".to_string(), - version: "0.27.1".to_string(), + version: "0.27.2".to_string(), }; let result: JsonResult<_, ()> = JsonResult::Success(vec![version.clone(), rest_api_version]); diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 081e1ea64e..5237d234bd 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-types" -version = "0.27.1" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" 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 082cae11ed..9258c4c07f 100644 --- a/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs +++ b/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs @@ -66,14 +66,14 @@ impl From for RawMsgRegisterInterchainAccount { } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, prost::Message)] pub struct LegacyRawMsgRegisterInterchainAccount { #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, + pub owner: String, #[prost(string, tag = "2")] - pub connection_id: ::prost::alloc::string::String, + pub connection_id: String, #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, + pub version: String, } #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] diff --git a/crates/relayer-types/src/applications/transfer/packet.rs b/crates/relayer-types/src/applications/transfer/packet.rs index c467542fe4..7b13d49b1e 100644 --- a/crates/relayer-types/src/applications/transfer/packet.rs +++ b/crates/relayer-types/src/applications/transfer/packet.rs @@ -1,6 +1,4 @@ -use std::convert::TryFrom; use std::str::FromStr; -use std::string::{String, ToString}; use ibc_proto::ibc::applications::transfer::v2::FungibleTokenPacketData as RawPacketData; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs index 9ca7c7e233..9e53f1e63f 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs @@ -1,4 +1,3 @@ -use std::convert::{TryFrom, TryInto}; use std::time::Duration; use prost::Message; diff --git a/crates/relayer-types/src/core/ics02_client/client_state.rs b/crates/relayer-types/src/core/ics02_client/client_state.rs index 007bc19e17..bf2d7cb706 100644 --- a/crates/relayer-types/src/core/ics02_client/client_state.rs +++ b/crates/relayer-types/src/core/ics02_client/client_state.rs @@ -1,5 +1,4 @@ use core::fmt::Debug; -use std::marker::{Send, Sync}; use std::time::Duration; use crate::core::ics02_client::client_type::ClientType; diff --git a/crates/relayer-types/src/core/ics02_client/consensus_state.rs b/crates/relayer-types/src/core/ics02_client/consensus_state.rs index fc544f800d..196f486d7e 100644 --- a/crates/relayer-types/src/core/ics02_client/consensus_state.rs +++ b/crates/relayer-types/src/core/ics02_client/consensus_state.rs @@ -1,5 +1,4 @@ use core::fmt::Debug; -use core::marker::{Send, Sync}; use crate::core::ics02_client::client_type::ClientType; use crate::core::ics23_commitment::commitment::CommitmentRoot; diff --git a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs index 8f249b820f..55f095c4f7 100644 --- a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs +++ b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs @@ -2,7 +2,6 @@ //! represented as a fraction with valid values in the //! range `[0, 1)`. -use std::convert::TryFrom; use std::fmt::{Display, Error as FmtError, Formatter}; use std::str::FromStr; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs index 8cebee431b..bd7ce58751 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs @@ -1,8 +1,4 @@ -use std::{ - convert::{TryFrom, TryInto}, - str::FromStr, - time::Duration, -}; +use std::{str::FromStr, time::Duration}; use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenTry as RawMsgConnectionOpenTry; diff --git a/crates/relayer-types/src/core/ics04_channel/packet_id.rs b/crates/relayer-types/src/core/ics04_channel/packet_id.rs index d492d0a80a..f55d2aa2cc 100644 --- a/crates/relayer-types/src/core/ics04_channel/packet_id.rs +++ b/crates/relayer-types/src/core/ics04_channel/packet_id.rs @@ -1,5 +1,4 @@ use ibc_proto::ibc::core::channel::v1::PacketId as ProtoPacketId; -use std::convert::TryFrom; use std::str::FromStr; use crate::core::ics04_channel::error::Error; diff --git a/crates/relayer-types/src/core/ics23_commitment/commitment.rs b/crates/relayer-types/src/core/ics23_commitment/commitment.rs index 978f126df0..7a6cee11e9 100644 --- a/crates/relayer-types/src/core/ics23_commitment/commitment.rs +++ b/crates/relayer-types/src/core/ics23_commitment/commitment.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use std::{convert::TryFrom, fmt}; +use std::fmt; use subtle_encoding::{Encoding, Hex}; use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; diff --git a/crates/relayer-types/src/core/ics23_commitment/merkle.rs b/crates/relayer-types/src/core/ics23_commitment/merkle.rs index 64704c8bb2..229c8c0c7b 100644 --- a/crates/relayer-types/src/core/ics23_commitment/merkle.rs +++ b/crates/relayer-types/src/core/ics23_commitment/merkle.rs @@ -102,7 +102,7 @@ impl MerkleProof { ) { return Err(Error::verification_failure()); } - value = subroot.clone(); + value.clone_from(&subroot); } _ => return Err(Error::invalid_merkle_proof()), } diff --git a/crates/relayer-types/src/core/ics24_host/identifier.rs b/crates/relayer-types/src/core/ics24_host/identifier.rs index e96bebfb01..bba663db3f 100644 --- a/crates/relayer-types/src/core/ics24_host/identifier.rs +++ b/crates/relayer-types/src/core/ics24_host/identifier.rs @@ -1,4 +1,4 @@ -use std::convert::{From, Infallible}; +use std::convert::Infallible; use std::fmt::{Debug, Display, Error as FmtError, Formatter}; use std::str::FromStr; diff --git a/crates/relayer-types/src/core/ics24_host/path.rs b/crates/relayer-types/src/core/ics24_host/path.rs index 300982d929..321549795f 100644 --- a/crates/relayer-types/src/core/ics24_host/path.rs +++ b/crates/relayer-types/src/core/ics24_host/path.rs @@ -579,7 +579,6 @@ fn parse_upgrades(components: &[&str]) -> Option { #[cfg(test)] mod tests { use super::*; - use core::str::FromStr; #[test] fn invalid_path_doesnt_parse() { diff --git a/crates/relayer-types/src/events.rs b/crates/relayer-types/src/events.rs index 9f05e3aecd..3ec1892eb1 100644 --- a/crates/relayer-types/src/events.rs +++ b/crates/relayer-types/src/events.rs @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::convert::TryFrom; use std::fmt::{Display, Error as FmtError, Formatter}; use std::str::FromStr; diff --git a/crates/relayer-types/src/lib.rs b/crates/relayer-types/src/lib.rs index 7684e0b41a..61f3b14cbc 100644 --- a/crates/relayer-types/src/lib.rs +++ b/crates/relayer-types/src/lib.rs @@ -4,11 +4,9 @@ #![allow(clippy::large_enum_variant)] #![deny( - // warnings, trivial_casts, trivial_numeric_casts, unused_import_braces, - unused_qualifications, rust_2018_idioms )] #![forbid(unsafe_code)] @@ -60,7 +58,7 @@ pub mod utils; mod serializers; /// Re-export of ICS 002 Height domain type -pub type Height = crate::core::ics02_client::height::Height; +pub type Height = core::ics02_client::height::Height; #[cfg(test)] mod test; diff --git a/crates/relayer-types/src/mock/header.rs b/crates/relayer-types/src/mock/header.rs index 2f5c931201..cd53cd6a68 100644 --- a/crates/relayer-types/src/mock/header.rs +++ b/crates/relayer-types/src/mock/header.rs @@ -122,7 +122,6 @@ impl From for Any { #[cfg(test)] mod tests { use super::*; - use ibc_proto::Protobuf; #[test] fn encode_any() { diff --git a/crates/relayer-types/src/utils/pretty.rs b/crates/relayer-types/src/utils/pretty.rs index d2f2ab5f79..d44745b956 100644 --- a/crates/relayer-types/src/utils/pretty.rs +++ b/crates/relayer-types/src/utils/pretty.rs @@ -81,7 +81,7 @@ impl<'a, T: Display> Display for PrettySlice<'a, T> { mod tests { use super::*; - use std::{string::String, vec}; + use std::vec; #[test] fn test_pretty_duration_micros() { diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index 7bd502febf..d18f04c463 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer" -version = "0.27.1" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -21,8 +21,8 @@ telemetry = ["ibc-telemetry"] [dependencies] ibc-proto = { version = "0.42.0", features = ["serde"] } -ibc-telemetry = { version = "0.27.1", path = "../telemetry", optional = true } -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types", features = ["mocks"] } +ibc-telemetry = { version = "0.27.2", path = "../telemetry", optional = true } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types", features = ["mocks"] } subtle-encoding = "0.5" humantime-serde = "1.1.1" @@ -110,7 +110,7 @@ version = "0.34.0" default-features = false [dev-dependencies] -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types", features = ["mocks"] } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types", features = ["mocks"] } serial_test = "3.0.0" env_logger = "0.11.1" test-log = { version = "0.2.14", features = ["trace"] } diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index 53505d2b0d..eec3a6b7dd 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -1,15 +1,10 @@ use alloc::sync::Arc; +use core::{future::Future, str::FromStr, time::Duration}; +use std::{cmp::Ordering, thread}; + use bytes::{Buf, Bytes}; -use core::{ - convert::{TryFrom, TryInto}, - future::Future, - str::FromStr, - time::Duration, -}; use futures::future::join_all; use num_bigint::BigInt; -use std::{cmp::Ordering, thread}; - use tokio::runtime::Runtime as TokioRuntime; use tonic::codegen::http::Uri; use tonic::metadata::AsciiMetadataValue; diff --git a/crates/relayer/src/chain/cosmos/encode.rs b/crates/relayer/src/chain/cosmos/encode.rs index 3743c769f5..447785f97e 100644 --- a/crates/relayer/src/chain/cosmos/encode.rs +++ b/crates/relayer/src/chain/cosmos/encode.rs @@ -111,7 +111,7 @@ pub fn sign_tx( fn encode_key_bytes(key_pair: &Secp256k1KeyPair) -> Result, Error> { let mut pk_buf = Vec::new(); - prost::Message::encode(&key_pair.public_key.serialize().to_vec(), &mut pk_buf) + Message::encode(&key_pair.public_key.serialize().to_vec(), &mut pk_buf) .map_err(|e| Error::protobuf_encode("PublicKey".into(), e))?; Ok(pk_buf) @@ -133,7 +133,7 @@ fn encode_sign_doc( // A protobuf serialization of a SignDoc let mut signdoc_buf = Vec::new(); - prost::Message::encode(&sign_doc, &mut signdoc_buf).unwrap(); + Message::encode(&sign_doc, &mut signdoc_buf).unwrap(); let signed = key_pair.sign(&signdoc_buf).map_err(Error::key_base)?; @@ -168,7 +168,7 @@ fn encode_signer_info( fn encode_tx_raw(tx_raw: TxRaw) -> Result, Error> { let mut tx_bytes = Vec::new(); - prost::Message::encode(&tx_raw, &mut tx_bytes) + Message::encode(&tx_raw, &mut tx_bytes) .map_err(|e| Error::protobuf_encode("Transaction".to_string(), e))?; Ok(tx_bytes) @@ -196,7 +196,7 @@ fn auth_info_and_bytes(signer_info: SignerInfo, fee: Fee) -> Result<(AuthInfo, V // A protobuf serialization of a AuthInfo let mut auth_buf = Vec::new(); - prost::Message::encode(&auth_info, &mut auth_buf) + Message::encode(&auth_info, &mut auth_buf) .map_err(|e| Error::protobuf_encode(String::from("AuthInfo"), e))?; Ok((auth_info, auth_buf)) @@ -219,7 +219,7 @@ fn tx_body_and_bytes( // A protobuf serialization of a TxBody let mut body_buf = Vec::new(); - prost::Message::encode(&body, &mut body_buf) + Message::encode(&body, &mut body_buf) .map_err(|e| Error::protobuf_encode(String::from("TxBody"), e))?; Ok((body, body_buf)) diff --git a/crates/relayer/src/chain/cosmos/query/custom.rs b/crates/relayer/src/chain/cosmos/query/custom.rs index 80740aa0dd..a31c64db47 100644 --- a/crates/relayer/src/chain/cosmos/query/custom.rs +++ b/crates/relayer/src/chain/cosmos/query/custom.rs @@ -1,9 +1,10 @@ use crate::chain::requests::CrossChainQueryRequest; use crate::error::Error; -use hex; + use ibc_relayer_types::applications::ics31_icq::{ error::Error as CrossChainQueryError, response::CrossChainQueryResponse, }; + use tendermint_rpc::{Client, HttpClient}; pub async fn cross_chain_query_via_rpc( diff --git a/crates/relayer/src/chain/endpoint.rs b/crates/relayer/src/chain/endpoint.rs index 11f47a7486..a65c1a345e 100644 --- a/crates/relayer/src/chain/endpoint.rs +++ b/crates/relayer/src/chain/endpoint.rs @@ -1,5 +1,4 @@ use alloc::sync::Arc; -use core::convert::TryFrom; use tokio::runtime::Runtime as TokioRuntime; diff --git a/crates/relayer/src/chain/requests.rs b/crates/relayer/src/chain/requests.rs index cc45908172..4874d3145d 100644 --- a/crates/relayer/src/chain/requests.rs +++ b/crates/relayer/src/chain/requests.rs @@ -66,7 +66,7 @@ impl TryFrom for AsciiMetadataValue { } impl Display for QueryHeight { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { QueryHeight::Latest => write!(f, "latest height"), QueryHeight::Specific(height) => write!(f, "{height}"), @@ -93,7 +93,7 @@ pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin /// querying the next page most efficiently. Only one of offset or key /// should be set. - pub key: ::prost::alloc::vec::Vec, + pub key: Vec, /// offset is a numeric offset that can be used when key is unavailable. /// It is less efficient than using key. Only one of offset or key should /// be set. diff --git a/crates/relayer/src/chain/runtime.rs b/crates/relayer/src/chain/runtime.rs index d19fbd9cfe..f6670109d6 100644 --- a/crates/relayer/src/chain/runtime.rs +++ b/crates/relayer/src/chain/runtime.rs @@ -31,7 +31,6 @@ use ibc_relayer_types::{ use crate::{ account::Balance, - chain::requests::QueryPacketEventDataRequest, client_state::{AnyClientState, IdentifiedAnyClientState}, config::ChainConfig, connection::ConnectionMsgType, diff --git a/crates/relayer/src/config.rs b/crates/relayer/src/config.rs index c7fb2a2e70..0642af4242 100644 --- a/crates/relayer/src/config.rs +++ b/crates/relayer/src/config.rs @@ -754,7 +754,7 @@ impl<'de> Deserialize<'de> for ChainConfig { /// Attempt to load and parse the TOML config file as a `Config`. pub fn load(path: impl AsRef) -> Result { - let config_toml = std::fs::read_to_string(&path).map_err(Error::io)?; + let config_toml = fs::read_to_string(&path).map_err(Error::io)?; let config = toml::from_str::(&config_toml[..]).map_err(Error::decode)?; diff --git a/crates/relayer/src/config/filter.rs b/crates/relayer/src/config/filter.rs index 9733671b0c..f6ff932797 100644 --- a/crates/relayer/src/config/filter.rs +++ b/crates/relayer/src/config/filter.rs @@ -373,7 +373,6 @@ impl<'de> Deserialize<'de> for ChannelFilterMatch { pub(crate) mod port { use super::*; - use ibc_relayer_types::core::ics24_host::identifier::PortId; pub struct PortFilterMatchVisitor; @@ -401,7 +400,6 @@ pub(crate) mod port { pub(crate) mod channel { use super::*; - use ibc_relayer_types::core::ics24_host::identifier::ChannelId; pub struct ChannelFilterMatchVisitor; @@ -430,7 +428,6 @@ pub(crate) mod channel { #[cfg(test)] mod tests { use super::*; - use crate::config::filter::ChannelPolicy; #[test] fn deserialize_packet_filter_policy() { diff --git a/crates/relayer/src/event.rs b/crates/relayer/src/event.rs index 2c347b1505..bf58338eb7 100644 --- a/crates/relayer/src/event.rs +++ b/crates/relayer/src/event.rs @@ -468,7 +468,6 @@ mod tests { use ibc_proto::google::protobuf::Any; use ibc_proto::Protobuf; use ibc_relayer_types::clients::ics07_tendermint::header::test_util::get_dummy_ics07_header; - use ibc_relayer_types::core::ics02_client::header::{decode_header, AnyHeader}; #[test] fn extract_header() { diff --git a/crates/relayer/src/event/source/websocket.rs b/crates/relayer/src/event/source/websocket.rs index 7993440267..de5194031e 100644 --- a/crates/relayer/src/event/source/websocket.rs +++ b/crates/relayer/src/event/source/websocket.rs @@ -131,7 +131,7 @@ impl EventSource { rx_cmd, ws_url, rpc_compat, - subscriptions: Box::new(futures::stream::empty()), + subscriptions: Box::new(stream::empty()), }; Ok((source, TxEventSourceCmd(tx_cmd))) @@ -297,8 +297,7 @@ impl EventSource { async fn run_loop(&mut self) -> Next { // Take ownership of the subscriptions - let subscriptions = - core::mem::replace(&mut self.subscriptions, Box::new(futures::stream::empty())); + let subscriptions = core::mem::replace(&mut self.subscriptions, Box::new(stream::empty())); // Convert the stream of RPC events into a stream of event batches. let batches = stream_batches(subscriptions, self.chain_id.clone(), self.batch_delay); diff --git a/crates/relayer/src/event/source/websocket/extract.rs b/crates/relayer/src/event/source/websocket/extract.rs index f2213e6acd..4a183edfb8 100644 --- a/crates/relayer/src/event/source/websocket/extract.rs +++ b/crates/relayer/src/event/source/websocket/extract.rs @@ -1,5 +1,4 @@ use alloc::collections::BTreeMap as HashMap; -use core::convert::TryFrom; use ibc_relayer_types::applications::ics29_fee::events::DistributionType; use tendermint_rpc::{event::Event as RpcEvent, event::EventData as RpcEventData}; diff --git a/crates/relayer/src/extension_options.rs b/crates/relayer/src/extension_options.rs index b796a5cbbe..f5eda5c08c 100644 --- a/crates/relayer/src/extension_options.rs +++ b/crates/relayer/src/extension_options.rs @@ -9,7 +9,7 @@ use crate::error::Error; #[derive(Clone, PartialEq, Eq, Message, Serialize, Deserialize)] pub struct ExtensionOptionDynamicFeeTx { #[prost(string, tag = "1")] - pub max_priority_price: ::prost::alloc::string::String, + pub max_priority_price: String, } impl ExtensionOptionDynamicFeeTx { diff --git a/crates/relayer/src/keyring/any_signing_key_pair.rs b/crates/relayer/src/keyring/any_signing_key_pair.rs index b9dd880c10..f6aa27bd0b 100644 --- a/crates/relayer/src/keyring/any_signing_key_pair.rs +++ b/crates/relayer/src/keyring/any_signing_key_pair.rs @@ -30,7 +30,7 @@ impl AnySigningKeyPair { Self::Ed25519(key_pair) => key_pair.as_any(), } .downcast_ref::() - .map(T::clone) + .cloned() } } diff --git a/crates/relayer/src/lib.rs b/crates/relayer/src/lib.rs index a4def98be1..eb0ea4dd40 100644 --- a/crates/relayer/src/lib.rs +++ b/crates/relayer/src/lib.rs @@ -3,7 +3,6 @@ trivial_casts, trivial_numeric_casts, unused_import_braces, - unused_qualifications, rust_2018_idioms )] #![allow(clippy::too_many_arguments)] @@ -15,7 +14,7 @@ //! //! For the IBC relayer binary, please see [Hermes] (`ibc-relayer-cli` crate). //! -//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.1/ +//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.2/ extern crate alloc; diff --git a/crates/relayer/src/link/cli.rs b/crates/relayer/src/link/cli.rs index d5f896cc6e..f4e37bccc9 100644 --- a/crates/relayer/src/link/cli.rs +++ b/crates/relayer/src/link/cli.rs @@ -1,4 +1,3 @@ -use std::convert::TryInto; use std::ops::RangeInclusive; use std::thread; use std::time::{Duration, Instant}; diff --git a/crates/relayer/src/link/pending.rs b/crates/relayer/src/link/pending.rs index 30b3d6a9b4..8abc47bbd9 100644 --- a/crates/relayer/src/link/pending.rs +++ b/crates/relayer/src/link/pending.rs @@ -1,4 +1,3 @@ -use core::iter::Iterator; use core::time::Duration; use std::time::Instant; diff --git a/crates/relayer/src/util/profiling.rs b/crates/relayer/src/util/profiling.rs index a6371e53fe..7aabd06c75 100644 --- a/crates/relayer/src/util/profiling.rs +++ b/crates/relayer/src/util/profiling.rs @@ -8,7 +8,7 @@ use serde_derive::Serialize; use serde_json::Value; std::thread_local! { - pub static DEPTH: AtomicUsize = AtomicUsize::new(0); + pub static DEPTH: AtomicUsize = const { AtomicUsize::new(0) }; } static FILE: OnceCell> = OnceCell::new(); diff --git a/crates/relayer/src/worker/packet.rs b/crates/relayer/src/worker/packet.rs index 7439301828..841b6ada98 100644 --- a/crates/relayer/src/worker/packet.rs +++ b/crates/relayer/src/worker/packet.rs @@ -161,7 +161,7 @@ pub fn spawn_incentivized_packet_cmd_worker> = RwArc::new_lock( - moka::sync::Cache::builder() + Cache::builder() .time_to_live(INCENTIVIZED_CACHE_TTL) .max_capacity(INCENTIVIZED_CACHE_MAX_CAPACITY) .build(), diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml index 228b3f07fa..5e065264c7 100644 --- a/crates/telemetry/Cargo.toml +++ b/crates/telemetry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-telemetry" -version = "0.27.1" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -13,7 +13,7 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.1", path = "../relayer-types" } +ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } once_cell = "1.19.0" opentelemetry = { version = "0.19.0", features = ["metrics"] } diff --git a/guide/README.md b/guide/README.md index d4234490c6..8491178669 100644 --- a/guide/README.md +++ b/guide/README.md @@ -10,7 +10,7 @@ mdBook is a utility to create modern online books from Markdown files. This guide should be permanently deployed at its latest stable version at [hermes.informal.systems](https://hermes.informal.systems). -Current version: `v1.8.1`. +Current version: `v1.8.2`. The version of this guide is aligned with the [versioning of the ibc crates](../README.md). diff --git a/tools/integration-test/Cargo.toml b/tools/integration-test/Cargo.toml index 4773b8c93d..f817feefde 100644 --- a/tools/integration-test/Cargo.toml +++ b/tools/integration-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-integration-test" -version = "0.27.1" +version = "0.27.2" edition = "2021" rust-version = "1.71" license = "Apache-2.0" diff --git a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs index 336b0c1b23..44d6cb40e4 100644 --- a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs @@ -37,7 +37,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs index d7e7c5456f..ac938158d2 100644 --- a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs @@ -38,7 +38,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs index 050c81cdcd..1cfcd0f921 100644 --- a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs @@ -37,7 +37,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/mbt/handlers.rs b/tools/integration-test/src/mbt/handlers.rs index b9c362744e..32c445984e 100644 --- a/tools/integration-test/src/mbt/handlers.rs +++ b/tools/integration-test/src/mbt/handlers.rs @@ -3,16 +3,12 @@ use ibc_relayer::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::chain::ext::transfer::ChainTransferMethodsExt; -use ibc_test_framework::chain::tagged::TaggedChainDriverExt; -use ibc_test_framework::ibc::denom::derive_ibc_denom; 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::binary::connection::ConnectedConnection; use ibc_test_framework::types::tagged::mono::Tagged; use super::state::Packet; diff --git a/tools/integration-test/src/mbt/utils.rs b/tools/integration-test/src/mbt/utils.rs index 1b7d9f0e26..809eddb7e7 100644 --- a/tools/integration-test/src/mbt/utils.rs +++ b/tools/integration-test/src/mbt/utils.rs @@ -1,12 +1,8 @@ -use std::thread::sleep; -use std::time::Duration; - use ibc_relayer::chain::requests::{ QueryPacketAcknowledgementsRequest, QueryPacketCommitmentsRequest, QueryUnreceivedAcksRequest, QueryUnreceivedPacketsRequest, }; use ibc_relayer_types::core::ics04_channel::packet::Sequence; -use ibc_test_framework::ibc::denom::Denom; use ibc_test_framework::prelude::*; use ibc_test_framework::types::tagged::mono::Tagged; diff --git a/tools/integration-test/src/tests/client_expiration.rs b/tools/integration-test/src/tests/client_expiration.rs index 007ac0b459..082cacf70a 100644 --- a/tools/integration-test/src/tests/client_expiration.rs +++ b/tools/integration-test/src/tests/client_expiration.rs @@ -1,7 +1,4 @@ -use core::time::Duration; -use std::thread::sleep; - -use ibc_relayer::config::{self, ChainConfig, Config, ModeConfig}; +use ibc_relayer::config::{self, ChainConfig, ModeConfig}; use ibc_relayer_types::core::ics03_connection::connection::State as ConnectionState; use ibc_relayer_types::core::ics04_channel::channel::State as ChannelState; @@ -10,7 +7,6 @@ use ibc_test_framework::bootstrap::binary::channel::{ bootstrap_channel_with_chains, bootstrap_channel_with_connection, }; use ibc_test_framework::bootstrap::binary::connection::bootstrap_connection; -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; use ibc_test_framework::relayer::channel::{ assert_eventually_channel_established, init_channel, query_channel_end, diff --git a/tools/integration-test/src/tests/client_filter.rs b/tools/integration-test/src/tests/client_filter.rs index 3378bfcc14..0410a91ba4 100644 --- a/tools/integration-test/src/tests/client_filter.rs +++ b/tools/integration-test/src/tests/client_filter.rs @@ -16,8 +16,6 @@ //! is allowed through the filter. It then asserts that client workers were //! established as a result of the connection being allowed through. -use std::time::Duration; - use ibc_relayer::supervisor::client_state_filter::{FilterPolicy, Permission}; use ibc_relayer_types::core::ics02_client::trust_threshold::TrustThreshold; diff --git a/tools/integration-test/src/tests/client_refresh.rs b/tools/integration-test/src/tests/client_refresh.rs index 8871cab801..e29adbb821 100644 --- a/tools/integration-test/src/tests/client_refresh.rs +++ b/tools/integration-test/src/tests/client_refresh.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use ibc_relayer::config::gas_multiplier::GasMultiplier; use ibc_relayer::config::ChainConfig; use ibc_relayer::foreign_client::CreateOptions; diff --git a/tools/integration-test/src/tests/client_settings.rs b/tools/integration-test/src/tests/client_settings.rs index cdb7465433..0a3c7656a4 100644 --- a/tools/integration-test/src/tests/client_settings.rs +++ b/tools/integration-test/src/tests/client_settings.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use ibc_relayer::chain::requests::{IncludeProof, QueryClientStateRequest, QueryHeight}; use ibc_relayer::client_state::AnyClientState; use ibc_relayer::config::ChainConfig; diff --git a/tools/integration-test/src/tests/connection_delay.rs b/tools/integration-test/src/tests/connection_delay.rs index d39da949da..0c8ca19e57 100644 --- a/tools/integration-test/src/tests/connection_delay.rs +++ b/tools/integration-test/src/tests/connection_delay.rs @@ -1,7 +1,5 @@ -use core::time::Duration; use time::OffsetDateTime; -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; use ibc_test_framework::util::random::random_u128_range; diff --git a/tools/integration-test/src/tests/consensus_states.rs b/tools/integration-test/src/tests/consensus_states.rs index cb7e289038..bfd0891679 100644 --- a/tools/integration-test/src/tests/consensus_states.rs +++ b/tools/integration-test/src/tests/consensus_states.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use ibc_relayer::chain::{ cosmos::query::consensus_state::query_consensus_states, requests::{PageRequest, QueryConsensusStateHeightsRequest, QueryConsensusStatesRequest}, diff --git a/tools/integration-test/src/tests/denom_trace.rs b/tools/integration-test/src/tests/denom_trace.rs index 695efe2876..3c56efbdcb 100644 --- a/tools/integration-test/src/tests/denom_trace.rs +++ b/tools/integration-test/src/tests/denom_trace.rs @@ -1,4 +1,3 @@ -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; #[test] diff --git a/tools/integration-test/src/tests/forward/forward_hop_transfer.rs b/tools/integration-test/src/tests/forward/forward_hop_transfer.rs index 3ae0337aba..931ceddd23 100644 --- a/tools/integration-test/src/tests/forward/forward_hop_transfer.rs +++ b/tools/integration-test/src/tests/forward/forward_hop_transfer.rs @@ -6,7 +6,7 @@ //! - The `AtomicIbcForwardHopTransferTest` tests the case where the //! hop between chain C and D fails. In this case the sender is still refunded. -use ibc_relayer::config::{self, Config, ModeConfig}; +use ibc_relayer::config::{self, ModeConfig}; use ibc_test_framework::prelude::*; use crate::tests::forward::memo::HopMemoField; diff --git a/tools/integration-test/src/tests/forward/forward_transfer.rs b/tools/integration-test/src/tests/forward/forward_transfer.rs index 4830ee43b6..65827fc0d6 100644 --- a/tools/integration-test/src/tests/forward/forward_transfer.rs +++ b/tools/integration-test/src/tests/forward/forward_transfer.rs @@ -18,7 +18,7 @@ //! the memo fields are misspelled: //! - Misspelled receiver address, port or channel: The intermediary chain will refund the sender. -use ibc_relayer::config::{self, Config, ModeConfig}; +use ibc_relayer::config::{self, ModeConfig}; use ibc_test_framework::prelude::*; use crate::tests::forward::memo::{ diff --git a/tools/integration-test/src/tests/ica.rs b/tools/integration-test/src/tests/ica.rs index 024e82a4d9..f62c642d2e 100644 --- a/tools/integration-test/src/tests/ica.rs +++ b/tools/integration-test/src/tests/ica.rs @@ -1,7 +1,6 @@ use std::collections::HashMap; use std::str::FromStr; -use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::config::{ filter::{ChannelFilters, ChannelPolicy, FilterPattern}, ChainConfig, PacketFilter, @@ -18,7 +17,6 @@ use ibc_relayer_types::timestamp::Timestamp; use ibc_relayer_types::tx_msg::Msg; use ibc_test_framework::chain::ext::ica::register_interchain_account; -use ibc_test_framework::ibc::denom::Denom; use ibc_test_framework::prelude::*; use ibc_test_framework::relayer::channel::{ assert_eventually_channel_closed, assert_eventually_channel_established, query_channel_end, diff --git a/tools/integration-test/src/tests/manual/simulation.rs b/tools/integration-test/src/tests/manual/simulation.rs index 71feb2ad6d..30c801bfcf 100644 --- a/tools/integration-test/src/tests/manual/simulation.rs +++ b/tools/integration-test/src/tests/manual/simulation.rs @@ -11,8 +11,7 @@ ``` */ -use core::time::Duration; -use ibc_relayer::config::{types::MaxMsgNum, ChainConfig, Config}; +use ibc_relayer::config::{types::MaxMsgNum, ChainConfig}; use ibc_relayer::transfer::{build_and_send_transfer_messages, TransferOptions}; use ibc_relayer_types::events::IbcEvent; use ibc_test_framework::prelude::*; diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index 52de0c5602..a44ee417cf 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -4,11 +4,10 @@ //! You can find a more thorough walkthrough of this test at //! `tools/test-framework/src/docs/walkthroughs/memo.rs`. +use ibc_relayer::config::types::Memo; use ibc_relayer::config::ChainConfig; -use ibc_relayer::config::{types::Memo, Config}; use serde_json as json; -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; use ibc_test_framework::util::random::{random_string, random_u128_range}; diff --git a/tools/integration-test/src/tests/ordered_channel.rs b/tools/integration-test/src/tests/ordered_channel.rs index 25177b4ee8..8f36e516c8 100644 --- a/tools/integration-test/src/tests/ordered_channel.rs +++ b/tools/integration-test/src/tests/ordered_channel.rs @@ -13,7 +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::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; use ibc_test_framework::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 acc9f0bee1..85484e42d1 100644 --- a/tools/integration-test/src/tests/ordered_channel_clear.rs +++ b/tools/integration-test/src/tests/ordered_channel_clear.rs @@ -2,7 +2,6 @@ use ibc_relayer::config::{types::MaxMsgNum, ChainConfig}; use ibc_relayer::link::{Link, LinkParameters}; use ibc_relayer::transfer::{build_and_send_transfer_messages, TransferOptions}; use ibc_relayer_types::events::IbcEvent; -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; use ibc_test_framework::util::random::random_u64_range; diff --git a/tools/integration-test/src/tests/supervisor.rs b/tools/integration-test/src/tests/supervisor.rs index 38daad74ed..fd24c71551 100644 --- a/tools/integration-test/src/tests/supervisor.rs +++ b/tools/integration-test/src/tests/supervisor.rs @@ -1,5 +1,4 @@ -use ibc_relayer::config::{self, Config, ModeConfig}; -use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_relayer::config::{self, ModeConfig}; use ibc_test_framework::prelude::*; use ibc_test_framework::relayer::channel::{assert_eventually_channel_established, init_channel}; diff --git a/tools/integration-test/src/tests/ternary_transfer.rs b/tools/integration-test/src/tests/ternary_transfer.rs index 2fca34ec8b..8302c9b8bd 100644 --- a/tools/integration-test/src/tests/ternary_transfer.rs +++ b/tools/integration-test/src/tests/ternary_transfer.rs @@ -1,4 +1,3 @@ -use ibc_test_framework::ibc::denom::derive_ibc_denom; use ibc_test_framework::prelude::*; #[test] diff --git a/tools/test-framework/Cargo.toml b/tools/test-framework/Cargo.toml index 384b6e3440..b36199cbde 100644 --- a/tools/test-framework/Cargo.toml +++ b/tools/test-framework/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-test-framework" -version = "0.27.1" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -14,9 +14,9 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "=0.27.1", path = "../../crates/relayer-types" } -ibc-relayer = { version = "=0.27.1", path = "../../crates/relayer" } -ibc-relayer-cli = { version = "=1.8.1", path = "../../crates/relayer-cli" } +ibc-relayer-types = { version = "=0.27.2", path = "../../crates/relayer-types" } +ibc-relayer = { version = "=0.27.2", path = "../../crates/relayer" } +ibc-relayer-cli = { version = "=1.8.2", path = "../../crates/relayer-cli" } ibc-proto = { version = "0.42.0", features = ["serde"] } tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } diff --git a/tools/test-framework/src/bootstrap/consumer.rs b/tools/test-framework/src/bootstrap/consumer.rs index 1c46b7e600..bd60bcdab1 100644 --- a/tools/test-framework/src/bootstrap/consumer.rs +++ b/tools/test-framework/src/bootstrap/consumer.rs @@ -5,7 +5,6 @@ use eyre::eyre; use std::sync::{Arc, RwLock}; use std::thread; use std::time::Duration; -use toml; use tracing::info; use crate::chain::builder::ChainBuilder; diff --git a/tools/test-framework/src/bootstrap/nary/chain.rs b/tools/test-framework/src/bootstrap/nary/chain.rs index 795ec74e69..95d0f71c78 100644 --- a/tools/test-framework/src/bootstrap/nary/chain.rs +++ b/tools/test-framework/src/bootstrap/nary/chain.rs @@ -2,7 +2,6 @@ Functions for bootstrapping N-ary number of chains. */ -use core::convert::TryInto; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::config::Config; use ibc_relayer::foreign_client::ForeignClient; diff --git a/tools/test-framework/src/bootstrap/nary/channel.rs b/tools/test-framework/src/bootstrap/nary/channel.rs index a954c23ed7..5e8d49ec86 100644 --- a/tools/test-framework/src/bootstrap/nary/channel.rs +++ b/tools/test-framework/src/bootstrap/nary/channel.rs @@ -2,7 +2,6 @@ Functions for bootstrapping N-ary number of channels. */ -use core::convert::TryInto; use core::time::Duration; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer_types::core::ics04_channel::channel::Ordering; diff --git a/tools/test-framework/src/bootstrap/nary/connection.rs b/tools/test-framework/src/bootstrap/nary/connection.rs index 932f9fc9be..1be22092d3 100644 --- a/tools/test-framework/src/bootstrap/nary/connection.rs +++ b/tools/test-framework/src/bootstrap/nary/connection.rs @@ -2,7 +2,6 @@ Functions for bootstrapping N-ary number of connections. */ -use core::convert::TryInto; use core::time::Duration; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::foreign_client::ForeignClient; diff --git a/tools/test-framework/src/bootstrap/single.rs b/tools/test-framework/src/bootstrap/single.rs index 5fec701964..508d0b28ba 100644 --- a/tools/test-framework/src/bootstrap/single.rs +++ b/tools/test-framework/src/bootstrap/single.rs @@ -4,7 +4,6 @@ use core::time::Duration; use eyre::eyre; use std::sync::{Arc, RwLock}; -use toml; use tracing::info; use crate::chain::builder::ChainBuilder; diff --git a/tools/test-framework/src/chain/ext/async_icq.rs b/tools/test-framework/src/chain/ext/async_icq.rs index 60998ea5d3..407a760302 100644 --- a/tools/test-framework/src/chain/ext/async_icq.rs +++ b/tools/test-framework/src/chain/ext/async_icq.rs @@ -1,6 +1,4 @@ use crate::chain::cli::async_icq::{async_icq, update_oracle}; -use crate::chain::driver::ChainDriver; -use crate::error::Error; use crate::prelude::*; use crate::types::tagged::*; diff --git a/tools/test-framework/src/chain/ext/bootstrap.rs b/tools/test-framework/src/chain/ext/bootstrap.rs index 9eb374d6d0..a05f4dc76e 100644 --- a/tools/test-framework/src/chain/ext/bootstrap.rs +++ b/tools/test-framework/src/chain/ext/bootstrap.rs @@ -6,7 +6,6 @@ use std::fs; use std::path::PathBuf; use std::str; use std::time::Duration; -use toml; use tracing::debug; use ibc_relayer::keyring::{Secp256k1KeyPair, SigningKeyPair}; diff --git a/tools/test-framework/src/chain/ext/ica.rs b/tools/test-framework/src/chain/ext/ica.rs index bd5b142fd2..c54c252b43 100644 --- a/tools/test-framework/src/chain/ext/ica.rs +++ b/tools/test-framework/src/chain/ext/ica.rs @@ -1,4 +1,3 @@ -use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::tracking::TrackedMsgs; use ibc_relayer_types::applications::ics27_ica::msgs::register::LegacyMsgRegisterInterchainAccount; use ibc_relayer_types::core::ics04_channel::version::Version; @@ -6,11 +5,8 @@ use ibc_relayer_types::events::IbcEvent; use ibc_relayer_types::tx_msg::Msg; use crate::chain::cli::ica::{query_interchain_account, register_interchain_account_cli}; -use crate::chain::driver::ChainDriver; -use crate::error::Error; use crate::prelude::*; use crate::types::tagged::*; -use crate::types::wallet::WalletAddress; pub trait InterchainAccountMethodsExt { fn register_interchain_account_cli( diff --git a/tools/test-framework/src/error.rs b/tools/test-framework/src/error.rs index d438f88bd9..796660e731 100644 --- a/tools/test-framework/src/error.rs +++ b/tools/test-framework/src/error.rs @@ -1,6 +1,5 @@ //! Error type used for the tests. -use core::convert::{From, Into}; use std::io::{Error as IoError, ErrorKind as IoErrorKind}; use eyre::Report; diff --git a/tools/test-framework/src/framework/binary/node.rs b/tools/test-framework/src/framework/binary/node.rs index 745cf57f03..ff59b4a13e 100644 --- a/tools/test-framework/src/framework/binary/node.rs +++ b/tools/test-framework/src/framework/binary/node.rs @@ -3,8 +3,6 @@ running without setting up the relayer. */ -use toml; - use crate::bootstrap::single::bootstrap_single_node; use crate::chain::builder::ChainBuilder; use crate::error::Error; diff --git a/tools/test-framework/src/types/env.rs b/tools/test-framework/src/types/env.rs index 427d50eaa1..7028aa8b32 100644 --- a/tools/test-framework/src/types/env.rs +++ b/tools/test-framework/src/types/env.rs @@ -2,7 +2,6 @@ Types for exporting test setup information into environment variables. */ -use core::convert::AsRef; use itertools::Itertools; use std::collections::BTreeMap; use std::fs::write; diff --git a/tools/test-framework/src/types/nary/chains.rs b/tools/test-framework/src/types/nary/chains.rs index 74579e8e32..5602113446 100644 --- a/tools/test-framework/src/types/nary/chains.rs +++ b/tools/test-framework/src/types/nary/chains.rs @@ -2,7 +2,6 @@ Constructs for N-ary connected chains. */ -use core::convert::{From, TryFrom}; use eyre::eyre; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::foreign_client::ForeignClient; diff --git a/tools/test-framework/src/types/nary/channel.rs b/tools/test-framework/src/types/nary/channel.rs index 68864f4786..decb941fa1 100644 --- a/tools/test-framework/src/types/nary/channel.rs +++ b/tools/test-framework/src/types/nary/channel.rs @@ -2,7 +2,6 @@ Constructs for N-ary connected channels. */ -use core::convert::TryFrom; use eyre::eyre; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::channel::Channel; diff --git a/tools/test-framework/src/types/nary/connection.rs b/tools/test-framework/src/types/nary/connection.rs index faa01cff7b..87866f42d8 100644 --- a/tools/test-framework/src/types/nary/connection.rs +++ b/tools/test-framework/src/types/nary/connection.rs @@ -2,7 +2,6 @@ Constructs for N-ary connected connections. */ -use core::convert::TryFrom; use eyre::eyre; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer_types::core::ics24_host::identifier::ConnectionId; diff --git a/tools/test-framework/src/types/nary/foreign_client.rs b/tools/test-framework/src/types/nary/foreign_client.rs index 33080f4944..e840b1eb97 100644 --- a/tools/test-framework/src/types/nary/foreign_client.rs +++ b/tools/test-framework/src/types/nary/foreign_client.rs @@ -1,4 +1,3 @@ -use core::convert::TryFrom; use eyre::eyre; use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::foreign_client::ForeignClient; diff --git a/tools/test-framework/src/types/tagged/dual.rs b/tools/test-framework/src/types/tagged/dual.rs index ffbafb3133..605f15820c 100644 --- a/tools/test-framework/src/types/tagged/dual.rs +++ b/tools/test-framework/src/types/tagged/dual.rs @@ -12,9 +12,8 @@ corresponds to a channel connected to a counterparty chain `ChainB`. */ -use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}; +use core::cmp::Ordering; use core::fmt::{self, Debug, Display}; -use core::iter::{IntoIterator, Iterator}; use core::marker::PhantomData; /** diff --git a/tools/test-framework/src/types/tagged/mono.rs b/tools/test-framework/src/types/tagged/mono.rs index ef4a228b93..a1e8a1f448 100644 --- a/tools/test-framework/src/types/tagged/mono.rs +++ b/tools/test-framework/src/types/tagged/mono.rs @@ -17,9 +17,8 @@ */ -use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}; +use core::cmp::Ordering; use core::fmt::{self, Debug, Display}; -use core::iter::{IntoIterator, Iterator}; use core::marker::PhantomData; use serde::{Serialize, Serializer}; diff --git a/tools/test-framework/src/util/array.rs b/tools/test-framework/src/util/array.rs index fc2a2ef88f..17aaa451fc 100644 --- a/tools/test-framework/src/util/array.rs +++ b/tools/test-framework/src/util/array.rs @@ -2,7 +2,6 @@ Helpers for manipulating fixed-sized arrays. */ -use core::convert::TryInto; use eyre::eyre; use crate::error::Error;