diff --git a/.github/workflows/cargo-doc.yaml b/.github/workflows/cargo-doc.yaml index ebc03618b6..507c0ee919 100644 --- a/.github/workflows/cargo-doc.yaml +++ b/.github/workflows/cargo-doc.yaml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2023-07-13 + toolchain: nightly-2024-09-15 override: true - name: Build API documentation diff --git a/crates/relayer-cli/src/commands/clear.rs b/crates/relayer-cli/src/commands/clear.rs index 83ca60c562..4279bfba40 100644 --- a/crates/relayer-cli/src/commands/clear.rs +++ b/crates/relayer-cli/src/commands/clear.rs @@ -229,7 +229,7 @@ where mod tests { use std::str::FromStr; - use abscissa_core::clap::Parser; + use clap::Parser as _; use ibc_relayer_types::core::{ ics04_channel::packet::Sequence, ics24_host::identifier::{ @@ -239,6 +239,8 @@ mod tests { }, }; + use crate::commands::clear::ClearPacketsCmd; + #[test] fn test_clear_packets_required_only() { assert_eq!( diff --git a/crates/relayer-cli/src/commands/create/channel.rs b/crates/relayer-cli/src/commands/create/channel.rs index 01b26dd79e..5954e78341 100644 --- a/crates/relayer-cli/src/commands/create/channel.rs +++ b/crates/relayer-cli/src/commands/create/channel.rs @@ -126,8 +126,7 @@ pub struct CreateChannelCommand { #[clap( long = "order", value_name = "ORDER", - help = "The channel ordering, valid options 'unordered' (default) and 'ordered'", - default_value_t + help = "The channel ordering, valid options 'unordered' (default) and 'ordered'" )] order: Ordering, diff --git a/crates/relayer-cli/src/commands/query/packet/commitment.rs b/crates/relayer-cli/src/commands/query/packet/commitment.rs index cc4069fe60..9ca346d67a 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitment.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitment.rs @@ -22,7 +22,6 @@ use ibc_relayer_types::{ }, Height, }; -use serde::Serialize; use subtle_encoding::{ Encoding, Hex, @@ -38,12 +37,6 @@ 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-cli/src/commands/tx/channel.rs b/crates/relayer-cli/src/commands/tx/channel.rs index 73813b95ef..7cbf036960 100644 --- a/crates/relayer-cli/src/commands/tx/channel.rs +++ b/crates/relayer-cli/src/commands/tx/channel.rs @@ -127,7 +127,6 @@ pub struct TxChanOpenInitCmd { #[clap( long = "order", - default_value_t, value_name = "ORDER", help = "The channel ordering, valid options 'unordered' (default) and 'ordered'" )] diff --git a/crates/relayer-cli/tests/acceptance.rs b/crates/relayer-cli/tests/acceptance.rs index c50c4b0866..0f3e0c575e 100644 --- a/crates/relayer-cli/tests/acceptance.rs +++ b/crates/relayer-cli/tests/acceptance.rs @@ -30,7 +30,6 @@ use once_cell::sync::Lazy; pub static RUNNER: Lazy = Lazy::new(CmdRunner::default); /// Use `Config::default()` value if no config or args -#[cfg(not(tarpaulin))] #[test] fn start_no_args() { let mut runner = RUNNER.clone(); @@ -46,7 +45,6 @@ fn start_no_args() { cmd.wait().unwrap().expect_success(); } -#[cfg(not(tarpaulin))] #[test] fn example_configuration_is_valid() { let mut runner = RUNNER.clone(); diff --git a/crates/relayer/src/chain/cosmos/config.rs b/crates/relayer/src/chain/cosmos/config.rs index c64e8e0503..4dfbc753fc 100644 --- a/crates/relayer/src/chain/cosmos/config.rs +++ b/crates/relayer/src/chain/cosmos/config.rs @@ -71,7 +71,7 @@ pub struct CosmosSdkConfig { pub max_gas: Option, // This field is only meant to be set via the `update client` command, - // for when we need to ugprade a client across a genesis restart and + // for when we need to upgrade a client across a genesis restart and // therefore need and archive node to fetch blocks from. pub genesis_restart: Option, diff --git a/crates/relayer/src/event.rs b/crates/relayer/src/event.rs index fa3fff5e54..d80b75defd 100644 --- a/crates/relayer/src/event.rs +++ b/crates/relayer/src/event.rs @@ -493,14 +493,10 @@ mod tests { }; use ibc_relayer_types::{ clients::ics07_tendermint::header::test_util::get_dummy_ics07_header, - core::{ - ics02_client::header::{ - decode_header, - AnyHeader, - }, - ics04_channel::packet::Sequence, + core::ics02_client::header::{ + decode_header, + AnyHeader, }, - timestamp::Timestamp, }; use super::*; diff --git a/tools/integration-test/src/tests/clear_packet.rs b/tools/integration-test/src/tests/clear_packet.rs index f2287c4aa4..19ccfb75f8 100644 --- a/tools/integration-test/src/tests/clear_packet.rs +++ b/tools/integration-test/src/tests/clear_packet.rs @@ -330,6 +330,7 @@ impl TestOverrides for ClearPacketOverrideTest { match chain_config { // Use a small clear interval in the chain configurations to override the global high interval ChainConfig::CosmosSdk(chain_config) => chain_config.clear_interval = Some(10), + ChainConfig::Astria(chain_config) => chain_config.clear_interval = Some(10), } } } diff --git a/tools/integration-test/src/tests/client_expiration.rs b/tools/integration-test/src/tests/client_expiration.rs index a4ded4a522..bd8ac53fbc 100644 --- a/tools/integration-test/src/tests/client_expiration.rs +++ b/tools/integration-test/src/tests/client_expiration.rs @@ -137,6 +137,9 @@ impl TestOverrides for ExpirationTestOverrides { ChainConfig::CosmosSdk(chain_config) => { chain_config.trusting_period = Some(CLIENT_EXPIRY); } + ChainConfig::Astria(chain_config) => { + chain_config.trusting_period = Some(CLIENT_EXPIRY); + } } } } diff --git a/tools/integration-test/src/tests/client_refresh.rs b/tools/integration-test/src/tests/client_refresh.rs index 14f86e2106..551586998e 100644 --- a/tools/integration-test/src/tests/client_refresh.rs +++ b/tools/integration-test/src/tests/client_refresh.rs @@ -133,12 +133,16 @@ impl BinaryChainTest for ClientFailsTest { let chains2 = override_connected_chains( chains, |config| { - { - let ChainConfig::CosmosSdk(config_chain_a) = &mut config.chains[0]; - config_chain_a.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); - } - - let ChainConfig::CosmosSdk(config_chain_b) = &mut config.chains[1]; + let config_chain_a = match config.chains[0] { + ChainConfig::CosmosSdk(ref mut config) => config, + ChainConfig::Astria(ref mut config) => config, + }; + config_chain_a.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); + + let config_chain_b = match config.chains[1] { + ChainConfig::CosmosSdk(ref mut config) => config, + ChainConfig::Astria(ref mut config) => config, + }; config_chain_b.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); }, config, diff --git a/tools/integration-test/src/tests/client_settings.rs b/tools/integration-test/src/tests/client_settings.rs index 6553d401a8..02e0874f07 100644 --- a/tools/integration-test/src/tests/client_settings.rs +++ b/tools/integration-test/src/tests/client_settings.rs @@ -41,6 +41,12 @@ impl TestOverrides for ClientDefaultsTest { chain_config_a.trusting_period = Some(Duration::from_secs(120_000)); chain_config_a.trust_threshold = TrustThreshold::new(13, 23).unwrap(); } + ChainConfig::Astria(chain_config_a) => { + chain_config_a.clock_drift = Duration::from_secs(3); + chain_config_a.max_block_time = Duration::from_secs(5); + chain_config_a.trusting_period = Some(Duration::from_secs(120_000)); + chain_config_a.trust_threshold = TrustThreshold::new(13, 23).unwrap(); + } } match &mut config.chains[1] { @@ -50,6 +56,12 @@ impl TestOverrides for ClientDefaultsTest { chain_config_b.trusting_period = Some(Duration::from_secs(340_000)); chain_config_b.trust_threshold = TrustThreshold::TWO_THIRDS; } + ChainConfig::Astria(chain_config_b) => { + chain_config_b.clock_drift = Duration::from_secs(6); + chain_config_b.max_block_time = Duration::from_secs(15); + chain_config_b.trusting_period = Some(Duration::from_secs(340_000)); + chain_config_b.trust_threshold = TrustThreshold::TWO_THIRDS; + } } } } diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index c37d74d330..a4faaf6926 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -37,6 +37,9 @@ impl TestOverrides for MemoTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.memo_prefix = self.memo.clone(); } + ChainConfig::Astria(chain_config) => { + chain_config.memo_prefix = self.memo.clone(); + } } } } diff --git a/tools/integration-test/src/tests/ordered_channel_clear.rs b/tools/integration-test/src/tests/ordered_channel_clear.rs index 0774bbeb60..fc202a7e59 100644 --- a/tools/integration-test/src/tests/ordered_channel_clear.rs +++ b/tools/integration-test/src/tests/ordered_channel_clear.rs @@ -67,6 +67,9 @@ impl TestOverrides for OrderedChannelClearTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.sequential_batch_tx = self.sequential_batch_tx; } + ChainConfig::Astria(chain_config) => { + chain_config.sequential_batch_tx = self.sequential_batch_tx; + } } } @@ -75,6 +78,9 @@ impl TestOverrides for OrderedChannelClearTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.sequential_batch_tx = self.sequential_batch_tx; } + ChainConfig::Astria(chain_config) => { + chain_config.sequential_batch_tx = self.sequential_batch_tx; + } } } @@ -209,6 +215,10 @@ impl TestOverrides for OrderedChannelClearEqualCLITest { chain_config.sequential_batch_tx = true; chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); } + ChainConfig::Astria(chain_config) => { + chain_config.sequential_batch_tx = true; + chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); + } } } @@ -218,6 +228,10 @@ impl TestOverrides for OrderedChannelClearEqualCLITest { chain_config.sequential_batch_tx = true; chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); } + ChainConfig::Astria(chain_config) => { + chain_config.sequential_batch_tx = true; + chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); + } } } diff --git a/tools/integration-test/src/tests/python.rs b/tools/integration-test/src/tests/python.rs index 74381db1c1..67535cd81f 100644 --- a/tools/integration-test/src/tests/python.rs +++ b/tools/integration-test/src/tests/python.rs @@ -24,6 +24,9 @@ impl TestOverrides for PythonTest { // with external relayer commands. chain_config.key_store_type = Store::Test; } + ChainConfig::Astria(chain_config) => { + chain_config.key_store_type = Store::Test; + } } } }