Skip to content

Commit

Permalink
chore(deps): use tikv-jemallocator instead of jemallocator (#7232)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Mar 19, 2024
1 parent ce89a2b commit 9d039a2
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 96 deletions.
119 changes: 59 additions & 60 deletions Cargo.lock

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

15 changes: 5 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,8 @@ reth-trie = { path = "crates/trie" }
reth-trie-parallel = { path = "crates/trie-parallel" }

# revm
revm = { version = "7.1.0", features = [
"std",
"secp256k1",
], default-features = false }
revm-primitives = { version = "3.0.0", features = [
"std",
], default-features = false }
revm = { version = "7.1.0", features = ["std", "secp256k1"], default-features = false }
revm-primitives = { version = "3.0.0", features = ["std"], default-features = false }
revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "f96bc1f" }

# eth
Expand Down Expand Up @@ -277,9 +272,9 @@ discv5 = "0.4"
igd-next = "0.14.3"

# rpc
jsonrpsee = { version = "0.20" }
jsonrpsee-core = { version = "0.20" }
jsonrpsee-types = { version = "0.20" }
jsonrpsee = "0.20"
jsonrpsee-core = "0.20"
jsonrpsee-types = "0.20"

# crypto
secp256k1 = { version = "0.27.0", default-features = false, features = [
Expand Down
8 changes: 3 additions & 5 deletions bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ itertools.workspace = true
rayon.workspace = true
boyer-moore-magiclen = "0.2.16"

[target.'cfg(not(windows))'.dependencies]
jemallocator = { version = "0.5.0", optional = true }

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.5.0", optional = true }
libc = "0.2"

[dev-dependencies]
Expand All @@ -110,8 +108,8 @@ default = ["jemalloc"]

asm-keccak = ["reth-primitives/asm-keccak"]

jemalloc = ["dep:jemallocator", "reth-node-core/jemalloc"]
jemalloc-prof = ["jemalloc", "jemallocator?/profiling"]
jemalloc = ["dep:tikv-jemallocator", "reth-node-core/jemalloc"]
jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"]

min-error-logs = ["tracing/release_max_level_error"]
min-warn-logs = ["tracing/release_max_level_warn"]
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub mod sigsegv_handler {
}

#[cfg(all(feature = "jemalloc", unix))]
use jemallocator as _;
use tikv_jemallocator as _;

// for rendering diagrams
use aquamarine as _;
2 changes: 1 addition & 1 deletion bin/reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// We use jemalloc for performance reasons.
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

#[cfg(all(feature = "optimism", not(test)))]
compile_error!("Cannot build the `reth` binary with the `optimism` feature flag enabled. Did you mean to build `op-reth`?");
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/optimism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use reth_provider::BlockReaderIdExt;
// We use jemalloc for performance reasons
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

#[cfg(not(feature = "optimism"))]
compile_error!("Cannot build the `op-reth` binary with the `optimism` feature flag disabled. Did you mean to build `reth`?");
Expand Down
Loading

0 comments on commit 9d039a2

Please sign in to comment.