From fee6f6fda2b61957926b9f21ee387f35e61ccb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ci=C4=99=C5=BCarkiewicz?= Date: Fri, 8 Nov 2024 14:27:46 -0800 Subject: [PATCH 1/2] chore(ci): speed up devimint startup --- gateway/ln-gateway/src/lightning/ldk.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gateway/ln-gateway/src/lightning/ldk.rs b/gateway/ln-gateway/src/lightning/ldk.rs index 0710597411c..cb97725af3b 100644 --- a/gateway/ln-gateway/src/lightning/ldk.rs +++ b/gateway/ln-gateway/src/lightning/ldk.rs @@ -7,7 +7,8 @@ use async_trait::async_trait; use bitcoin::hashes::Hash; use bitcoin::{Network, OutPoint}; use fedimint_bip39::Mnemonic; -use fedimint_core::task::{TaskGroup, TaskHandle}; +use fedimint_core::envs::is_env_var_set; +use fedimint_core::task::{block_in_place, TaskGroup, TaskHandle}; use fedimint_core::{Amount, BitcoinAmountOrAll}; use fedimint_ln_common::contracts::Preimage; use ldk_node::config::EsploraSyncConfig; @@ -225,6 +226,13 @@ impl Drop for GatewayLdkClient { #[async_trait] impl ILnRpcClient for GatewayLdkClient { async fn info(&self) -> Result { + // HACK: https://github.com/lightningdevkit/ldk-node/issues/339 when running in devimint + // to speed up tests + if is_env_var_set("FM_IN_DEVIMINT") { + block_in_place(|| { + let _ = self.node.sync_wallets(); + }); + } let node_status = self.node.status(); let Some(esplora_chain_tip_block_summary) = self From 129f553e218e08da666999dab3870398ad435bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ci=C4=99=C5=BCarkiewicz?= Date: Fri, 8 Nov 2024 14:28:32 -0800 Subject: [PATCH 2/2] chore: improve default logging --- devimint/src/util.rs | 1 + fedimint-logging/src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/devimint/src/util.rs b/devimint/src/util.rs index 9f57c8c8503..2f89294ac18 100644 --- a/devimint/src/util.rs +++ b/devimint/src/util.rs @@ -171,6 +171,7 @@ impl ProcessManager { /// Logs to $FM_LOGS_DIR/{name}.{out,err} pub async fn spawn_daemon(&self, name: &str, mut cmd: Command) -> Result { + debug!(target: LOG_DEVIMINT, %name, "Spawning daemon"); let logs_dir = env::var(FM_LOGS_DIR_ENV)?; let path = format!("{logs_dir}/{name}.log"); let log = OpenOptions::new() diff --git a/fedimint-logging/src/lib.rs b/fedimint-logging/src/lib.rs index 19b4b889c64..c952c6785e9 100644 --- a/fedimint-logging/src/lib.rs +++ b/fedimint-logging/src/lib.rs @@ -118,9 +118,11 @@ impl TracingSetup { // We prefix everything with a default general log level and // good per-module specific default. User provided RUST_LOG // can override one or both - "{},{},{},{},{},{}", + "{},{},{},{},{},{},{},{}", self.base_level.as_deref().unwrap_or("info"), "jsonrpsee_core::client::async_client=off", + "hyper=off", + "h2=off", "jsonrpsee_server=warn,jsonrpsee_server::transport=off", "AlephBFT-=error", var,