Skip to content
Merged
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
17 changes: 0 additions & 17 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,23 +355,6 @@ lldb target/debugging/forest
- `FULLNODE_API_INFO` - RPC endpoint and authentication token
- `FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT` - Disable F3 sidecar build (for debugging profile)

## Cargo Features

- **`default`** - `jemalloc`, `tokio-console`, `tracing-loki`, `tracing-chrome`
- **`test`** - Default feature set for unit tests
- **`slim`** - Minimal feature set (uses rustalloc)
- **`jemalloc`** - Use jemalloc allocator (production default)
- **`rustalloc`** - Use Rust standard allocator
- **`system-alloc`** - Use system allocator (for memory profiling)
- **`tokio-console`** - Enable tokio-console integration
- **`tracing-loki`** - Send telemetry to Loki
- **`tracing-chrome`** - Chrome tracing support
- **`no-f3-sidecar`** - Disable F3 sidecar build
- **`cargo-test`** - Group of tests that is recommended to run with `cargo test` instead of `nextest`
- **`doctest-private`** - Enable doctests for private items
- **`benchmark-private`** - Enable benchmark suite
- **`interop-tests-private`** - Enable interop tests

## Build Profiles

- **`dev`** - Fast compile, line-table-only debug info, opt-level=1 for deps
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@

### Breaking

- [#6680](https://github.com/ChainSafe/forest/pull/6680) Made the `tokio-console` feature optional and disabled by default. Users relying on this feature must now explicitly compile Forest with `--features tokio-console` to enable it.
- [#6680](https://github.com/ChainSafe/forest/pull/6680): Made the `tokio-console` feature optional and disabled by default. Users relying on this feature must now explicitly compile Forest with `--features tokio-console` to enable it.

### Added

### Changed

### Removed

- [#6681](https://github.com/ChainSafe/forest/pull/6681): Removed `tracing-chrome` feature and all related code as it was deemed unused. If you didn't set `CHROME_TRACE_FILE` manually before, you shouldn't be affected by this change. If you were using this feature, reach out.

### Fixed

## Forest v0.32.3 "Unimpressive Serenity"
Expand Down
12 changes: 0 additions & 12 deletions Cargo.lock

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

14 changes: 6 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ zstd = "0.13"
console-subscriber = { version = "0.5", features = ["parking_lot"], optional = true }
sqlx = { version = "0.8", default-features = false, features = ["sqlite", "runtime-tokio", "macros"], optional = true }
tikv-jemallocator = { version = "0.6", optional = true }
tracing-chrome = { version = "0.7", optional = true }
tracing-loki = { version = "0.2", default-features = false, features = ["compat-0-2-1", "rustls"], optional = true }

[target.'cfg(unix)'.dependencies]
Expand Down Expand Up @@ -321,13 +320,13 @@ lto = "fat"

# These should be refactored (probably removed) in #2984
[features]
default = ["jemalloc", "tracing-loki", "tracing-chrome", "sqlite"]
test = [] # default feature set for unit tests
default = ["jemalloc", "tracing-loki", "sqlite"]
test = [] # default feature set for unit tests
slim = ["rustalloc"]
cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest`
doctest-private = [] # see lib.rs::doctest_private
benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private
interop-tests-private = [] # see lib.rs::interop_tests_private
cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest`
doctest-private = [] # see lib.rs::doctest_private
benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private
interop-tests-private = [] # see lib.rs::interop_tests_private
sqlite = ["dep:sqlx"]

# Allocator. Use at most one of these.
Expand All @@ -337,7 +336,6 @@ system-alloc = [] # Use the platform allocator (for memory pr

tokio-console = ["dep:console-subscriber"]
tracing-loki = ["dep:tracing-loki"]
tracing-chrome = ["dep:tracing-chrome"]

no-f3-sidecar = []

Expand Down
2 changes: 1 addition & 1 deletion src/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where

let client = rpc::Client::default_or_from_env(token.as_deref())?;

let (_bg_tasks, _guards) = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default());
let _bg_tasks = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default());

cmd.run(client).await
}
33 changes: 2 additions & 31 deletions src/cli_shared/logger/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ use crate::utils::misc::LoggingColor;

type BackgroundTask = Pin<Box<dyn Future<Output = ()> + Send>>;

#[derive(Default)]
pub struct Guards {
#[cfg(feature = "tracing-chrome")]
tracing_chrome: Option<tracing_chrome::FlushGuard>,
}

#[allow(unused_mut)]
pub fn setup_logger(opts: &CliOpts) -> (Vec<BackgroundTask>, Guards) {
pub fn setup_logger(opts: &CliOpts) -> Vec<BackgroundTask> {
let mut background_tasks: Vec<BackgroundTask> = vec![];
let mut guards = Guards::default();
let mut layers: Vec<Box<dyn tracing_subscriber::layer::Layer<Registry> + Send + Sync>> =
// console logger
vec![Box::new(
Expand Down Expand Up @@ -88,30 +81,8 @@ pub fn setup_logger(opts: &CliOpts) -> (Vec<BackgroundTask>, Guards) {
}
}

// Go to <https://ui.perfetto.dev> to browse trace files.
// You may want to call ChromeLayerBuilder::trace_style as appropriate
if let Some(_chrome_trace_file) = std::env::var_os("CHROME_TRACE_FILE") {
#[cfg(not(feature = "tracing-chrome"))]
tracing::warn!(
"`tracing-chrome` is unavailable, forest binaries need to be recompiled with `tracing-chrome` feature"
);

#[cfg(feature = "tracing-chrome")]
{
let (layer, guard) = match _chrome_trace_file.is_empty() {
true => tracing_chrome::ChromeLayerBuilder::new().build(),
false => tracing_chrome::ChromeLayerBuilder::new()
.file(_chrome_trace_file)
.build(),
};

guards.tracing_chrome = Some(guard);
layers.push(Box::new(layer));
}
}

tracing_subscriber::registry().with(layers).init();
(background_tasks, guards)
background_tasks
}

// Log warnings to stderr
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ where
// Run forest as a daemon if no other subcommands are used. Otherwise, run the
// subcommand.

let (background_tasks, _guards) = logger::setup_logger(&opts);
let background_tasks = logger::setup_logger(&opts);

if let Some(path) = &path {
match path {
Expand Down
Loading