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

@@ -33,6 +33,8 @@ slasher-redb = ["slasher/redb"]
beacon-node-leveldb = ["store/leveldb"]
# Supports beacon node redb backend.
beacon-node-redb = ["store/redb"]
# Supports console subscriber for debugging
console-subscriber = ["console-subscriber/default"]
# Deprecated. This is now enabled by default on non windows targets.
jemalloc = []
@@ -45,6 +47,7 @@ bls = { workspace = true }
boot_node = { path = "../boot_node" }
clap = { workspace = true }
clap_utils = { workspace = true }
console-subscriber = { workspace = true, optional = true }
database_manager = { path = "../database_manager" }
directory = { workspace = true }
environment = { workspace = true }