From 16101afa68f5307c5dc6278334f5a39cae848ed3 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Wed, 2 Sep 2026 09:53:03 +0000 Subject: [PATCH 1/2] fix: disable precompile cache in integration tests --- crates/test/integration/src/runner.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/test/integration/src/runner.rs b/crates/test/integration/src/runner.rs index d5d3d4a..2087ff1 100644 --- a/crates/test/integration/src/runner.rs +++ b/crates/test/integration/src/runner.rs @@ -679,6 +679,8 @@ fn build_node_execution_config( // Use the synchronous state-root path to avoid debug-only panics from // Reth proof worker pools that are unrelated to lifecycle behavior. config.engine.legacy_state_root_task_enabled = true; + // These scenarios do not exercise precompile caching, whose memory is multiplied per node. + config.engine.precompile_cache_disabled = true; let reth_port_offset = u16::try_from(test_id * 100 + node_id.as_usize() * 10) .wrap_err("Reth port offset overflow")?; @@ -776,6 +778,16 @@ mod tests { } } + #[test] + fn execution_config_disables_precompile_cache() { + let temp_dir = TempDir::new().expect("temp dir"); + let ipc = IpcPaths::new(temp_dir.path()); + let config = build_node_execution_config(0, NodeId::new(0), &ipc, LOCAL_DEV.clone()) + .expect("node config"); + + assert!(config.engine.precompile_cache_disabled); + } + #[tokio::test] async fn consensus_bridge_uses_existing_handle_event_bus() { let handle = test_handle(); From 9f6521e70c208729b2a9229ec55beb3346e6891f Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Wed, 2 Sep 2026 10:00:21 +0000 Subject: [PATCH 2/2] fix: handle conditional ArcContext ownership --- crates/malachite-app/src/node.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/malachite-app/src/node.rs b/crates/malachite-app/src/node.rs index 3698853..402c5d6 100644 --- a/crates/malachite-app/src/node.rs +++ b/crates/malachite-app/src/node.rs @@ -849,11 +849,13 @@ impl App { #[cfg(not(feature = "byzantine"))] let ctx = ArcContext::new(); - // Initialize the application state with the resolved spec and genesis block - // NOTE: ArcContext is not always Copy, depending on whether - // `byzantine` feature is enabled, so we clone it here to avoid a conditional compilation warning. - #[allow(clippy::redundant_clone)] - let mut state = State::builder(ctx.clone()) + #[cfg(feature = "byzantine")] + let state_ctx = ctx.clone(); + #[cfg(not(feature = "byzantine"))] + let state_ctx = ctx; + + // Initialize the application state with the resolved spec and genesis block. + let mut state = State::builder(state_ctx) .identity(identity.consensus.clone()) .store(store.clone()) .config(self.config.clone())