Skip to content

Commit

Permalink
fix(op-reth): add jemalloc feature to optimism-cli for version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Oct 7, 2024
1 parent 54c8305 commit ddc5854
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/optimism/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ workspace = true
[features]
default = ["jemalloc"]

jemalloc = ["reth-cli-util/jemalloc"]
jemalloc = ["reth-cli-util/jemalloc", "reth-optimism-cli/jemalloc"]
jemalloc-prof = ["reth-cli-util/jemalloc-prof"]
tracy-allocator = ["reth-cli-util/tracy-allocator"]

Expand Down
9 changes: 9 additions & 0 deletions crates/optimism/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ reth-node-core.workspace = true
reth-optimism-node.workspace = true
reth-primitives.workspace = true

# so jemalloc metrics can be included
reth-node-metrics.workspace = true

## optimism
reth-optimism-primitives.workspace = true
reth-optimism-chainspec.workspace = true
Expand Down Expand Up @@ -82,3 +85,9 @@ asm-keccak = [
"reth-optimism-node/asm-keccak",
"reth-primitives/asm-keccak",
]

# Jemalloc feature for vergen to generate correct env vars
jemalloc = [
"reth-node-core/jemalloc",
"reth-node-metrics/jemalloc"
]
4 changes: 4 additions & 0 deletions crates/optimism/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ use reth_optimism_node::OptimismNode;
use reth_tracing::FileWorkerGuard;
use tracing::info;

// This allows us to manually enable node metrics features, required for proper jemalloc metric
// reporting
use reth_node_metrics as _;

/// The main op-reth cli interface.
///
/// This is the entrypoint to the executable.
Expand Down

0 comments on commit ddc5854

Please sign in to comment.