From 50922a4b62dec538ea711ff8be899913792637b6 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 13:33:27 -0300 Subject: [PATCH 1/8] rustflags adding avx2 flags to compilation --- .cargo/config.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index aeeacca0145..ac993cdca80 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,6 @@ [target.x86_64-unknown-linux-gnu] -rustflags = ["-Ctarget-cpu=x86-64-v2"] +rustflags = [ + "-Ctarget-cpu=x86-64-v2", + "-Csha2_backend=x86-avx2", + "-Ctarget-feature=+avx2", +] From f1fd04f6bcdb59a4dc883d033e90b7e34bc1b163 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 13:34:11 -0300 Subject: [PATCH 2/8] uniformization of sha3 with workspace crate --- crates/networking/p2p/Cargo.toml | 2 +- crates/networking/rpc/Cargo.toml | 7 +++++-- crates/vm/levm/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/networking/p2p/Cargo.toml b/crates/networking/p2p/Cargo.toml index ce819dc570d..4949ab6198a 100644 --- a/crates/networking/p2p/Cargo.toml +++ b/crates/networking/p2p/Cargo.toml @@ -37,7 +37,7 @@ rocksdb = { workspace = true, optional = true } prometheus = "0.14.0" tokio-stream = "0.1.17" -sha3 = "0.10.8" +sha3.workspace = true serde_json = "1.0.117" diff --git a/crates/networking/rpc/Cargo.toml b/crates/networking/rpc/Cargo.toml index 513016d088e..db811a5a46f 100644 --- a/crates/networking/rpc/Cargo.toml +++ b/crates/networking/rpc/Cargo.toml @@ -32,9 +32,12 @@ jsonwebtoken.workspace = true rand.workspace = true tokio-util = { workspace = true, features = ["codec"] } reqwest.workspace = true -sha3 = "0.10.8" +sha3.workspace = true sha2.workspace = true -jemalloc_pprof = { version = "0.8.0", optional = true, features = ["flamegraph", "symbolize"] } +jemalloc_pprof = { version = "0.8.0", optional = true, features = [ + "flamegraph", + "symbolize", +] } # Clients envy = "0.4.2" diff --git a/crates/vm/levm/Cargo.toml b/crates/vm/levm/Cargo.toml index b2fdf9a43b1..e24dc844412 100644 --- a/crates/vm/levm/Cargo.toml +++ b/crates/vm/levm/Cargo.toml @@ -17,7 +17,7 @@ thiserror.workspace = true serde = { workspace = true, features = ["derive", "rc"] } serde_json.workspace = true -sha3 = "0.10.8" +sha3.workspace = true datatest-stable = "0.2.9" walkdir = "2.5.0" secp256k1.workspace = true From 1c0b5a6896f194f33d23d8e85bba23d1feee1519 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 13:34:59 -0300 Subject: [PATCH 3/8] remove unused import tracing::error --- crates/blockchain/payload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/blockchain/payload.rs b/crates/blockchain/payload.rs index 40d0b3f7213..c3b1d845b00 100644 --- a/crates/blockchain/payload.rs +++ b/crates/blockchain/payload.rs @@ -43,7 +43,7 @@ use crate::{ }; use thiserror::Error; -use tracing::{debug, error, warn}; +use tracing::{debug, warn}; #[derive(Debug)] pub struct PayloadBuildTask { From 548546dcbd7646f35bd0f2d8756fbfdf61b29d61 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 14:38:55 -0300 Subject: [PATCH 4/8] remove sha2_backend flag due to the invalid flag --- .cargo/config.toml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index ac993cdca80..8fec2f9247d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,2 @@ [target.x86_64-unknown-linux-gnu] -rustflags = [ - "-Ctarget-cpu=x86-64-v2", - "-Csha2_backend=x86-avx2", - "-Ctarget-feature=+avx2", -] +rustflags = ["-Ctarget-cpu=x86-64-v2", "-Ctarget-feature=+avx2"] From a0da8ac5da8254107ccb5c1513903c176fc0984c Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 14:40:24 -0300 Subject: [PATCH 5/8] changing target-cpu to x86-64-v3 --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8fec2f9247d..5aabce96ce5 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [target.x86_64-unknown-linux-gnu] -rustflags = ["-Ctarget-cpu=x86-64-v2", "-Ctarget-feature=+avx2"] +rustflags = ["-Ctarget-cpu=x86-64-v3"] From f5d5780b7bb2ec85c830bcf622dd3e456484dced Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 15:04:25 -0300 Subject: [PATCH 6/8] adding target features --- .cargo/config.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 5aabce96ce5..c7c63a50f54 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,5 @@ [target.x86_64-unknown-linux-gnu] -rustflags = ["-Ctarget-cpu=x86-64-v3"] +rustflags = [ + "-Ctarget-cpu=x86-64-v3", + "-Ctarget-feature=+avx2+sse2+sse4.1+sse4.2+bmi1+lzcnt", +] From 33dd8e0c856ac260eca2d98cf4a975c4ce7ae3a3 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 15:19:31 -0300 Subject: [PATCH 7/8] target-feature fixed --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c7c63a50f54..47bc9356bb0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.x86_64-unknown-linux-gnu] rustflags = [ "-Ctarget-cpu=x86-64-v3", - "-Ctarget-feature=+avx2+sse2+sse4.1+sse4.2+bmi1+lzcnt", + "-Ctarget-feature=+avx2,+sse2,+sse4.1,+sse4.2,+bmi1,+lzcnt,+pclmulqdq", ] From bf8efc3da41c9a28430fc31ae271ff8a345fd132 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 4 Nov 2025 15:48:56 -0300 Subject: [PATCH 8/8] ssse3 to target_feature --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 47bc9356bb0..934b5126f60 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.x86_64-unknown-linux-gnu] rustflags = [ "-Ctarget-cpu=x86-64-v3", - "-Ctarget-feature=+avx2,+sse2,+sse4.1,+sse4.2,+bmi1,+lzcnt,+pclmulqdq", + "-Ctarget-feature=+avx2,+sse2,+ssse3,+sse4.1,+sse4.2,+bmi1,+lzcnt,+pclmulqdq", ]