Add console-subscriber feature for debugging (#7529)

Add `console-subscriber` feature for debugging tokio async tasks.

Supersedes #7420 to work with `unstable`.

Usage:
- Build Lighthouse with `RUSTFLAGS=--cfg tokio_unstable` and `--features console-subscriber`, e.g.:
```
RUSTFLAGS=-"-cfg=tokio_unstable --remap-path-prefix=$(pwd)=." FEATURES=console-subscriber make
```
- Run the Lighthouse binary.
- Install `tokio-console` and run it in a terminal.
This commit is contained in:
Jimmy Chen
2025-05-31 00:15:54 +10:00
committed by GitHub
parent 39744df93f
commit 38a5f338fa
4 changed files with 261 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ clap = { version = "4.5.4", features = ["derive", "cargo", "wrap_help"] }
clap_utils = { path = "common/clap_utils" }
compare_fields = { path = "common/compare_fields" }
compare_fields_derive = { path = "common/compare_fields_derive" }
console-subscriber = "0.4"
context_deserialize = { path = "consensus/context_deserialize" }
context_deserialize_derive = { path = "consensus/context_deserialize_derive" }
criterion = "0.5"