mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
asm-keccak added (#5997)
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
This commit is contained in:
2
Makefile
2
Makefile
@ -231,4 +231,4 @@ update-book-cli: ## Update book cli documentation.
|
||||
|
||||
.PHONY: maxperf
|
||||
maxperf:
|
||||
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc
|
||||
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak
|
||||
|
||||
@ -125,13 +125,18 @@ procfs = { version = "0.16.0" }
|
||||
|
||||
[features]
|
||||
default = ["jemalloc"]
|
||||
|
||||
asm-keccak = ["reth-primitives/asm-keccak"]
|
||||
|
||||
jemalloc = ["dep:jemallocator", "dep:jemalloc-ctl"]
|
||||
jemalloc-prof = ["jemalloc", "jemallocator?/profiling"]
|
||||
|
||||
min-error-logs = ["tracing/release_max_level_error"]
|
||||
min-warn-logs = ["tracing/release_max_level_warn"]
|
||||
min-info-logs = ["tracing/release_max_level_info"]
|
||||
min-debug-logs = ["tracing/release_max_level_debug"]
|
||||
min-trace-logs = ["tracing/release_max_level_trace"]
|
||||
|
||||
optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-revm/optimism",
|
||||
@ -149,6 +154,7 @@ optimism = [
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-ethereum-payload-builder/optimism",
|
||||
]
|
||||
|
||||
# no-op feature flag for switching between the `optimism` and default functionality in CI matrices
|
||||
ethereum = []
|
||||
|
||||
|
||||
@ -102,13 +102,18 @@ RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf
|
||||
|
||||
**Features**
|
||||
|
||||
Finally, some features may improve performance on your system, most notably `jemalloc`, which replaces the default memory allocator used by reth.
|
||||
Finally, some optional features are present that may improve performance, but may not very portable,
|
||||
and as such might not compile on your particular system. These are currently:
|
||||
- `jemalloc`: replaces the default system memory allocator with [`jemalloc`](https://jemalloc.net/); this feature is unstable on Windows
|
||||
- `asm-keccak`: replaces the default, pure-Rust implementation of Keccak256 with one implemented in assembly; see [the `keccak-asm` crate](https://github.com/DaniPopes/keccak-asm) for more details and supported targets
|
||||
- `min-LEVEL-logs`, where `LEVEL` is one of `error`, `warn`, `info`, `debug`, `trace`: disables compilation of logs of lower level than the given one; this in general isn't that significant, and is not recommended due to the loss of debugging that the logs would provide
|
||||
|
||||
You can enable features by passing them to the `--features` Cargo flag.
|
||||
You can activate features by passing them to the `--features` or `-F` Cargo flag;
|
||||
multiple features can be activated with a space- or comma-separated list to the flag:
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> The `jemalloc` feature is unstable on Windows due to jemallocator itself.
|
||||
```bash
|
||||
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@ -91,6 +91,7 @@ secp256k1.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["c-kzg"]
|
||||
asm-keccak = ["alloy-primitives/asm-keccak"]
|
||||
arbitrary = [
|
||||
"revm-primitives/arbitrary",
|
||||
"reth-rpc-types/arbitrary",
|
||||
|
||||
Reference in New Issue
Block a user