Skip to content
Open
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
67 changes: 10 additions & 57 deletions Cargo.lock

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

20 changes: 19 additions & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ ethrex-blockchain.workspace = true
ethrex-common.workspace = true
ethrex-config.workspace = true
ethrex-storage.workspace = true
ethrex-rlp.workspace = true
ethrex-trie.workspace = true
ethrex-p2p.workspace = true

bytes.workspace = true
tokio.workspace = true
serde_json.workspace = true
ethereum-types.workspace = true
rand = "0.9.2"
once_cell = "1"
Comment on lines +23 to +24
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 rand and once_cell belong in [dev-dependencies]

rand and once_cell are only used in benchmark files, so they should live under [dev-dependencies] alongside criterion. Placing them in [dependencies] makes them compile-time dependencies of the crate for all targets. The workspace already declares rand = "0.8.5"; using rand.workspace = true in [dev-dependencies] (or bumping the workspace version to 0.9) would also avoid carrying two semver-incompatible copies of rand in the build graph.

Suggested change
rand = "0.9.2"
once_cell = "1"
rand = { version = "0.9.2" }
once_cell = "1"

Move both lines into [dev-dependencies].

Prompt To Fix With AI
This is a comment left during a code review.
Path: benches/Cargo.toml
Line: 23-24

Comment:
**rand and once_cell belong in `[dev-dependencies]`**

`rand` and `once_cell` are only used in benchmark files, so they should live under `[dev-dependencies]` alongside `criterion`. Placing them in `[dependencies]` makes them compile-time dependencies of the crate for all targets. The workspace already declares `rand = "0.8.5"`; using `rand.workspace = true` in `[dev-dependencies]` (or bumping the workspace version to 0.9) would also avoid carrying two semver-incompatible copies of rand in the build graph.

```suggestion
rand = { version = "0.9.2" }
once_cell = "1"
```
Move both lines into `[dev-dependencies]`.

How can I resolve this? If you propose a fix, please make it concise.


[dev-dependencies]
criterion = { version = "0.5.1", features = [
criterion = { version = "0.7.0", features = [
"html_reports",
"async_futures",
"async_tokio",
Expand All @@ -31,5 +37,17 @@ ethrex-l2-rpc.workspace = true
name = "build_block_benchmark"
harness = false

[[bench]]
name = "rlp_decode"
harness = false

[[bench]]
name = "rlp_encode"
harness = false

[[bench]]
name = "p2p_decode"
harness = false

[lints]
workspace = true
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions crates/common/rlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,9 @@ ethereum-types = { version = "0.15.1", default-features = false, features = ["et

[dev-dependencies]
hex-literal.workspace = true
criterion = { version = "0.7.0", features = ["html_reports"] }
ethrex-common.workspace = true
ethrex-trie.workspace = true
rand = "0.9.2"
once_cell = "1"


[lib]
path = "./rlp.rs"

[lints]
workspace = true

[[bench]]
name = "decode"
harness = false

[[bench]]
name = "encode"
harness = false
5 changes: 0 additions & 5 deletions crates/networking/p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ crossbeam.workspace = true

[dev-dependencies]
hex-literal.workspace = true
criterion = { version = "0.5", features = ["html_reports"] }

[lib]
path = "./p2p.rs"
Expand All @@ -74,7 +73,3 @@ metrics = ["dep:ethrex-metrics"]
[lints.clippy]
unwrap_used = "deny"
redundant_clone = "warn"

[[bench]]
name = "decode"
harness = false
Loading