Files
reth/crates/trie/parallel/Cargo.toml
yongkangc 54d07c55e5 feat(engine): add descriptive thread names for spawn_blocking tasks
Closes #20430 by using prctl/pthread_setname_np to set thread names at runtime
inside spawn_blocking tasks, keeping Tokio's thread pooling while making tasks
identifiable in profilers like Samply.

Thread names (kept under 15-char Linux limit):
- reth-multiproof: Multi-proof computation task
- reth-sparse: Sparse trie task
- reth-prewarm: Prewarm task coordinator
- reth-prewarm-w: Prewarm worker threads
- reth-tx-conv: Transaction conversion task
- reth-tx-order: Transaction ordering task
- reth-stor-proof: Storage proof workers
- reth-acct-proof: Account proof workers

Changes:
- Add spawn_blocking_named() to WorkloadExecutor that uses set_thread_name()
- Add set_thread_name() helper using prctl (Linux) / pthread_setname_np (macOS)
- Update all engine blocking tasks to use named threads
- Update ProofWorkerHandle to set thread names inside spawn_blocking
2025-12-18 09:08:45 +00:00

75 lines
1.8 KiB
TOML

[package]
name = "reth-trie-parallel"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Parallel implementation of merkle root algorithm"
[lints]
workspace = true
[dependencies]
# reth
reth-execution-errors.workspace = true
reth-provider.workspace = true
reth-storage-errors.workspace = true
reth-trie-common.workspace = true
reth-trie-sparse = { workspace = true, features = ["std"] }
reth-trie.workspace = true
# alloy
alloy-rlp.workspace = true
alloy-primitives.workspace = true
# tracing
tracing.workspace = true
# misc
dashmap.workspace = true
thiserror.workspace = true
derive_more.workspace = true
rayon.workspace = true
itertools.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
crossbeam-channel.workspace = true
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# `metrics` feature
reth-metrics = { workspace = true, optional = true }
metrics = { workspace = true, optional = true }
[dev-dependencies]
# reth
reth-primitives-traits.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] }
reth-trie-db.workspace = true
reth-trie = { workspace = true, features = ["test-utils"] }
# misc
rand.workspace = true
criterion.workspace = true
proptest.workspace = true
proptest-arbitrary-interop.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] }
[features]
default = ["metrics"]
metrics = ["reth-metrics", "dep:metrics", "reth-trie/metrics", "reth-trie-sparse/metrics"]
test-utils = [
"reth-primitives-traits/test-utils",
"reth-provider/test-utils",
"reth-trie-common/test-utils",
"reth-trie-db/test-utils",
"reth-trie-sparse/test-utils",
"reth-trie/test-utils",
]
[[bench]]
name = "root"
harness = false