Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -534,29 +534,33 @@ op-alloy-rpc-jsonrpsee = { version = "0.22.4", default-features = false }
op-alloy-flz = { version = "0.13.1", default-features = false }

# misc
either = { version = "1.15.0", default-features = false }
arrayvec = { version = "0.7.6", default-features = false }
aquamarine = "0.6"
arrayvec = { version = "0.7.6", default-features = false }
auto_impl = "1"
backon = { version = "1.2", default-features = false, features = ["std-blocking-sleep", "tokio-sleep"] }
bincode = "1.3"
bitflags = "2.4"
boyer-moore-magiclen = "0.2.16"
bytes = { version = "1.5", default-features = false }
brotli = "8"
byteorder = "1"
bytes = { version = "1.5", default-features = false }
cfg-if = "1.0"
chrono = "0.4.41"
clap = "4"
dashmap = "6.0"
derive_more = { version = "2", default-features = false, features = ["full"] }
dirs-next = "2.0.0"
dyn-clone = "1.0.17"
either = { version = "1.15.0", default-features = false }
eyre = "0.6"
fdlimit = "0.3.0"
humantime = "2.1"
humantime-serde = "1.1"
itertools = { version = "0.14", default-features = false }
linked_hash_set = "0.1"
lz4 = "1.28.1"
mini-moka = "0.10"
miniz_oxide = { version = "0.8.4", default-features = false }
modular-bitfield = "0.11.2"
notify = { version = "8.0.0", default-features = false, features = ["macos_fsevent"] }
nybbles = { version = "0.4.2", default-features = false }
Expand All @@ -577,17 +581,14 @@ smallvec = "1"
strum = { version = "0.27", default-features = false }
strum_macros = "0.27"
syn = "2.0"
thiserror = { version = "2.0.0", default-features = false }
tar = "0.4.44"
tar-no-std = { version = "0.3.2", default-features = false }
thiserror = { version = "2.0.0", default-features = false }
thread-priority = "3"
tracing = { version = "0.1.0", default-features = false }
tracing-appender = "0.2"
url = { version = "2.3", default-features = false }
zstd = "0.13"
byteorder = "1"
mini-moka = "0.10"
tar-no-std = { version = "0.3.2", default-features = false }
miniz_oxide = { version = "0.8.4", default-features = false }
chrono = "0.4.41"

# metrics
metrics = "0.24.0"
Expand Down
9 changes: 5 additions & 4 deletions crates/engine/tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ metrics.workspace = true
reth-metrics = { workspace = true, features = ["common"] }

# misc
crossbeam-channel.workspace = true
dashmap.workspace = true
schnellru.workspace = true
rayon.workspace = true
tracing.workspace = true
derive_more.workspace = true
parking_lot.workspace = true
crossbeam-channel.workspace = true
rayon.workspace = true
schnellru.workspace = true
thread-priority.workspace = true
tracing.workspace = true

# optional deps for test-utils
reth-prune-types = { workspace = true, optional = true }
Expand Down
11 changes: 10 additions & 1 deletion crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ use std::{
},
time::Instant,
};
use thread_priority::{ThreadBuilderExt, ThreadPriority};
use tokio::sync::{
mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender},
oneshot::{self, error::TryRecvError},
Expand Down Expand Up @@ -409,7 +410,15 @@ where
evm_config,
);
let incoming = task.incoming_tx.clone();
std::thread::Builder::new().name("Engine Task".to_string()).spawn(|| task.run()).unwrap();
std::thread::Builder::new()
.name("Engine Task".to_string())
.spawn_with_priority(ThreadPriority::Max, |result| {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we document what this actually does?

if let Err(err) = result {
warn!(target: "engine::tree", ?err, "Failed to set thread priority");
}
task.run()
})
.unwrap();
(incoming, outgoing)
}

Expand Down
Loading