From a3342161c7e41ed9b85bf43b7c287c096732958d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Leegwater=20Sim=C3=B5es?= Date: Tue, 23 Jul 2024 20:57:43 +0200 Subject: [PATCH 1/3] node: fix "freed while still in use" error The `tokio::select!` macro seems to have changed in such a way as to not work well with the syntax we used, and in the process breaking their crate even if the version doesn't indicate it under semver rules. This commit addresses this by changing the syntax to something the macro understands. --- node/src/chain.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/chain.rs b/node/src/chain.rs index ad0f72a9bc..1ddf083f5d 100644 --- a/node/src/chain.rs +++ b/node/src/chain.rs @@ -116,7 +116,7 @@ impl tokio::select! { biased; // Receives results from the upper layer - recv = &mut result_chan.recv() => { + recv = result_chan.recv() => { match recv? { Err(ConsensusError::Canceled(round)) => { info!(event = "consensus canceled", round); @@ -186,7 +186,7 @@ impl } }, // Re-routes messages originated from Consensus (upper) layer to the network layer. - recv = &mut outbound_chan.recv() => { + recv = outbound_chan.recv() => { let msg = recv?; // Handle quorum messages from Consensus layer. From 37b52dd3b913e876fb8058ea27be74541659b115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Leegwater=20Sim=C3=B5es?= Date: Tue, 23 Jul 2024 21:09:47 +0200 Subject: [PATCH 2/3] rusk-prover: use only `tokio` major version number --- rusk-prover/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rusk-prover/Cargo.toml b/rusk-prover/Cargo.toml index 2d26ae3d84..46506bfc02 100644 --- a/rusk-prover/Cargo.toml +++ b/rusk-prover/Cargo.toml @@ -24,7 +24,7 @@ phoenix-circuits = { version = "0.2.1-rc", optional = true } [dev-dependencies] hex = "0.4" -tokio = { version = "1.17.0", features = ["full"] } +tokio = { version = "1", features = ["full"] } rand = "0.8" [features] From fe153fd5d10fa1645cf1d28bb416124d69bb135a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Leegwater=20Sim=C3=B5es?= Date: Tue, 23 Jul 2024 21:11:43 +0200 Subject: [PATCH 3/3] rusk: use only `tokio` major version number --- rusk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rusk/Cargo.toml b/rusk/Cargo.toml index 9938031da3..05d0275e52 100644 --- a/rusk/Cargo.toml +++ b/rusk/Cargo.toml @@ -13,7 +13,7 @@ name = "rusk" path = "src/bin/main.rs" [dependencies] -tokio = { version = "1.15", features = ["rt-multi-thread", "fs", "macros"] } +tokio = { version = "1", features = ["rt-multi-thread", "fs", "macros"] } futures-util = "0.3" tracing = "0.1" tracing-subscriber = { version = "0.3.0", features = [