Public report of paradigmxyz/reth, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 18:44 UTC · Survey ID cd_8a7937f4899843c8871d5059f6445d6a
paradigmxyz/reth
Measured 14 November 2026, 18:40 UTC, at code version 30c29f8
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
No change since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 412,395 lines of product code in 121 projects, tests not counted · Estimated rebuild effort: about 3.0 person-years · Weakest lens: Production Readiness, 44
Findings by how serious they are
31 critical1307 serious129 minor
15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 18:40 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
57of 57 dimensions measured by tools.
1367of 1467 findings point to an exact file and line, so you can open each one in the code. The other 100 concern the repository as a whole, such as missing documentation.
57dimensions across 7 lenses, read from 412,395 lines of product code in 121 projects.
paradigmxyz/reth falls short of our standard for production, in part because it has packages under a licence on your banned list. It scores 61 out of 100 and is rated Adequate, and 24 of its 31 critical findings are security problems in its servers and containers and in the build pipeline.
Production Readiness, at 44, is the weakest lens and counts most in the score. The best first step is replacing the five packages under a banned licence, worth about 14 points. Planning backups and recovery comes next, worth about 8 points. Raising Production Readiness to 70 would lift the score to about 71.
Thirteen settings leave the servers or containers unsafe. Six pipeline steps run downloads nobody checks, and five packages carry licence risk. Correcting the unsafe settings, checking each download against a checksum and replacing or clearing the banned-licence packages would close these risks. Correcting the flagged pipeline settings would fix the three weaknesses in the build pipeline's configuration, and the pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions. The piece of product code that depends on test code needs its reference to the test project removed.
The product code is 412,395 lines, about €440,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 44 to 70, the lowest score rated Strong, the score would rise from 61 to about 71.
Code composition: what the lines of code are
Product code 91%Tests 9%
New since the last survey: 416 findings
These 416 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · MethodTooLong: SessionManager.poll_pending_session_event crates/net/network/src/session/mod.rs
God Classes · TooManyMethods: CanonicalInMemoryState crates/chain-state/src/in_memory/canonical.rs
God Classes · FileTooLong: src/eth_requests.rs crates/net/network/src/eth_requests.rs
God Classes · MethodTooLong: EthPubSub.handle_accepted crates/rpc/rpc/src/eth/pubsub.rs
God Classes · FileTooLong: src/p2pstream.rs crates/net/eth-wire/src/p2pstream.rs
God Classes · TooManyFields: DefaultTxPoolValues crates/node/core/src/args/txpool.rs
God Classes · TooManyMethods: ArenaParallelSparseTrie crates/trie/sparse/src/arena/mod.rs
God Classes · TooManyFields: TxPoolArgs crates/node/core/src/args/txpool.rs
God Classes · MethodTooLong: TransactionFetcher.on_announcement crates/net/network/src/transactions/fetcher.rs
God Classes · FileTooLong: src/maintain.rs crates/transaction-pool/src/maintain.rs
Code Duplication · Near-duplicate member pair (89 shared lines) crates/storage/provider/src/providers/rocksdb/provider.rs
Code Duplication · Near-duplicate member pair (44 shared lines) crates/stages/stages/src/stages/hashing_account.rs
Code Duplication · Near-duplicate member pair (40 shared lines) crates/rpc/rpc-eth-api/src/helpers/transaction.rs
Code Duplication · Near-duplicate member pair (36 shared lines) crates/prune/prune/src/segments/user/account_history.rs
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/net/discv4/src/proto.rs
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/net/network/src/fetch/mod.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/cli/commands/src/db/repair_trie.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/cli/commands/src/db/stats.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/rpc/rpc-engine-api/src/engine_api.rs
Code Duplication · Edited copy of a member (67 corresponding lines) crates/trie/common/src/hashed_state.rs
Code Duplication · Edited copy of a member (93 corresponding lines) crates/stages/stages/src/stages/index_account_history.rs
Code Duplication · Edited copy of a member (72 corresponding lines) crates/storage/db-common/src/init.rs
Code Duplication · Edited copy of a member (63 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs
Code Duplication · Edited copy of a member (59 corresponding lines) crates/cli/commands/src/db/get.rs
Code Duplication · Edited copy of a member (46 corresponding lines) crates/cli/commands/src/db/migrate_v2.rs
Code Duplication · Edited copy of a member (72 corresponding lines) crates/prune/prune/src/segments/user/account_history.rs
Code Duplication · Edited copies of one member (3 members, 58+ corresponding lines) crates/transaction-pool/src/blobstore/disk.rs
Code Duplication · Edited copy of a member (52 corresponding lines) crates/stages/stages/src/stages/utils.rs
Code Duplication · Edited copy of a member (54 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs
Code Duplication · Edited copy of a member (62 corresponding lines) crates/prune/prune/src/segments/user/account_history.rs
Code Duplication · Edited copy of a member (47 corresponding lines) crates/stages/stages/src/stages/utils.rs
Code Duplication · Edited copy of a member (32 corresponding lines) crates/net/peers/src/node_record.rs
Code Duplication · Edited copy of a member (37 corresponding lines) crates/trie/common/src/proofs.rs
Code Duplication · Edited copy of a member (79 corresponding lines) .github/scripts/bench-reth-summary.py
Code Duplication · Edited copy of a member (38 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs
Code Duplication · Edited copy of a member (39 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs
Code Duplication · Edited copy of a member (38 corresponding lines) crates/transaction-pool/src/pool/pending.rs
Code Duplication · Edited copy of a member (54 corresponding lines) crates/storage/provider/src/providers/consistent.rs
Code Duplication · Edited copy of a member (49 corresponding lines) crates/trie/parallel/src/proof_task/mod.rs
Code Duplication · Edited copy of a member (39 corresponding lines) crates/storage/storage-overlay/src/manager.rs
Code Duplication · Edited copy of a member (35 corresponding lines) crates/storage/provider/src/providers/database/provider.rs
Code Duplication · Edited copy of a member (37 corresponding lines) crates/trie/common/src/hashed_state.rs
Code Duplication · Edited copy of a member (41 corresponding lines) crates/net/network/src/session/mod.rs
Code Duplication · Edited copy of a member (35 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/era/src/era/file.rs
Code Duplication · Edited copy of a member (40 corresponding lines) crates/rpc/rpc/src/validation.rs
Code Duplication · Edited copy of a member (41 corresponding lines) crates/stages/stages/src/stages/utils.rs
Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs
Code Duplication · Edited copy of a member (26 corresponding lines) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs
Code Duplication · Edited copy of a member (20 corresponding lines) crates/config/src/config.rs
Code Duplication · Edited copy of a member (25 corresponding lines) crates/tasks/src/worker_map.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/storage/provider/src/changeset_walker.rs
Code Duplication · Edited copy of a member (25 corresponding lines) crates/tasks/src/runtime.rs
Code Duplication · Edited copy of a member (23 corresponding lines) crates/net/eth-wire-types/src/broadcast.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs
Code Duplication · Edited copy of a member (26 corresponding lines) crates/storage/provider/src/providers/database/provider.rs
Code Duplication · Edited copy of a member (28 corresponding lines) crates/cli/commands/src/download/manifest.rs
Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) crates/engine/execution-cache/src/cached_state.rs
Code Duplication · Edited copies of one member (4 members, 39+ corresponding lines) crates/storage/provider/src/providers/consistent.rs
Code Duplication · Edited copy of a member (22 corresponding lines) crates/trie/common/src/range_proof.rs
Code Duplication · Edited copy of a member (19 corresponding lines) crates/transaction-pool/src/validate/task.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/node/core/src/args/trace.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/stages/stages/src/stages/utils.rs
Code Duplication · Edited copy of a member (33 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs
Code Duplication · Edited copy of a member (30 corresponding lines) crates/rpc/rpc/src/trace.rs
Code Duplication · Edited copy of a member (25 corresponding lines) crates/rpc/rpc/src/validation.rs
Code Duplication · Edited copy of a member (25 corresponding lines) crates/storage/provider/src/providers/state/latest.rs
Code Duplication · Edited copy of a member (26 corresponding lines) crates/engine/util/src/skip_fcu.rs
Code Duplication · Edited copy of a member (24 corresponding lines) crates/trie/common/src/proofs.rs
Code Duplication · Edited copy of a member (30 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/storage/storage-overlay/src/provider.rs
Code Duplication · Edited copy of a member (20 corresponding lines) crates/net/network/src/transactions/mod.rs
Code Duplication · Edited copy of a member (22 corresponding lines) crates/trie/common/src/hashed_state.rs
Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs
Code Duplication · Edited copy of a member (20 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs
Code Duplication · Edited copy of a member (27 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs
Code Duplication · Edited copy of a member (23 corresponding lines) crates/transaction-pool/src/pool/blob.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 134 findings
These 134 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.
€150,000 to €740,000, for 2,443 to 7,749 hours of work, about 3.0 person-years for 1 to 6 engineers
Difficulty of the problem
Low, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 61. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 412,395 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 5 Banned license finding(s) in License Compliance.
Raises the score by about 8 points · Medium effort · DR & Backup
3
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €440,000 to build again, about 3.0 person-years of work. Its weakest lens is Production Readiness, at 44 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 5 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 14 points for low effort, because it clears the 5 License Compliance findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
969 modules, with 2592 dependencies between them. 32 loops run through 107 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 929 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
reth_chain_state.in_memory.executed_block uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_chain_state.in_memory.executed_block, while a change to reth_chain_state.in_memory.executed_block can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_chain_state.in_memory.executed_block uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory.executed_block uses reth_trie_common.updates, so a change to reth_trie_common.updates can break reth_chain_state.in_memory.executed_block, while a change to reth_chain_state.in_memory.executed_block can't break reth_trie_common.updates.
Position
Below the diagonal: reth_chain_state.in_memory.executed_block uses a module listed above it, which is the healthy direction.
reth_chainspec.spec uses reth_network_peers.node_record, so a change to reth_network_peers.node_record can break reth_chainspec.spec, while a change to reth_chainspec.spec can't break reth_network_peers.node_record.
Position
Below the diagonal: reth_chainspec.spec uses a module listed above it, which is the healthy direction.
reth_evm.execute uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_evm.execute, while a change to reth_evm.execute can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_evm.execute uses a module listed above it, which is the healthy direction.
reth_evm.execute uses reth_trie_common.updates, so a change to reth_trie_common.updates can break reth_evm.execute, while a change to reth_evm.execute can't break reth_trie_common.updates.
Position
Below the diagonal: reth_evm.execute uses a module listed above it, which is the healthy direction.
reth_network_api uses reth_network_peers.node_record, so a change to reth_network_peers.node_record can break reth_network_api, while a change to reth_network_api can't break reth_network_peers.node_record.
Position
Below the diagonal: reth_network_api uses a module listed above it, which is the healthy direction.
reth_prune_types.mode uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_prune_types.mode, while a change to reth_prune_types.mode can't break reth_prune_types.segment.
Position
Below the diagonal: reth_prune_types.mode uses a module listed above it, which is the healthy direction.
reth_static_file_types.segment uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_static_file_types.segment, while a change to reth_static_file_types.segment can't break reth_stages_types.id.
Position
Below the diagonal: reth_static_file_types.segment uses a module listed above it, which is the healthy direction.
reth_storage_overlay.provider uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_storage_overlay.provider, while a change to reth_storage_overlay.provider can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_storage_overlay.provider uses a module listed above it, which is the healthy direction.
reth_transaction_pool uses reth_transaction_pool.traits, so a change to reth_transaction_pool.traits can break reth_transaction_pool, while a change to reth_transaction_pool can't break reth_transaction_pool.traits.
Position
Below the diagonal: reth_transaction_pool uses a module listed above it, which is the healthy direction.
reth_network.session uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_network.session, while a change to reth_network.session can't break reth_tasks.runtime.
Position
Below the diagonal: reth_network.session uses a module listed above it, which is the healthy direction.
reth_network.session uses reth_network_api, so a change to reth_network_api can break reth_network.session, while a change to reth_network.session can't break reth_network_api.
Position
Below the diagonal: reth_network.session uses a module listed above it, which is the healthy direction.
reth_network.transactions uses reth_transaction_pool.traits, so a change to reth_transaction_pool.traits can break reth_network.transactions, while a change to reth_network.transactions can't break reth_transaction_pool.traits.
Position
Below the diagonal: reth_network.transactions uses a module listed above it, which is the healthy direction.
reth_network.transactions uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_network.transactions, while a change to reth_network.transactions can't break reth_transaction_pool.
Position
Below the diagonal: reth_network.transactions uses a module listed above it, which is the healthy direction.
20→28 reth_network.transactions uses reth_network.networkpart of a loop✕
Connections
1 pair of types, where a type in reth_network.transactions uses a type in reth_network.network.
reth_network.transactions uses reth_network.network, so a change to reth_network.network can break reth_network.transactions, while a change to reth_network.transactions can't break reth_network.network.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
reth_node_core.node_config uses reth_config.config, so a change to reth_config.config can break reth_node_core.node_config, while a change to reth_node_core.node_config can't break reth_config.config.
Position
Below the diagonal: reth_node_core.node_config uses a module listed above it, which is the healthy direction.
reth_node_core.node_config uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_node_core.node_config, while a change to reth_node_core.node_config can't break reth_chainspec.spec.
Position
Below the diagonal: reth_node_core.node_config uses a module listed above it, which is the healthy direction.
reth_node_core.node_config uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_node_core.node_config, while a change to reth_node_core.node_config can't break reth_transaction_pool.
Position
Below the diagonal: reth_node_core.node_config uses a module listed above it, which is the healthy direction.
reth_provider.providers.static_file.manager uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_provider.providers.static_file.manager, while a change to reth_provider.providers.static_file.manager can't break reth_prune_types.segment.
Position
Below the diagonal: reth_provider.providers.static_file.manager uses a module listed above it, which is the healthy direction.
reth_provider.providers.static_file.manager uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_provider.providers.static_file.manager, while a change to reth_provider.providers.static_file.manager can't break reth_tasks.runtime.
Position
Below the diagonal: reth_provider.providers.static_file.manager uses a module listed above it, which is the healthy direction.
reth_provider.providers.static_file.manager uses reth_prune_types.mode, so a change to reth_prune_types.mode can break reth_provider.providers.static_file.manager, while a change to reth_provider.providers.static_file.manager can't break reth_prune_types.mode.
Position
Below the diagonal: reth_provider.providers.static_file.manager uses a module listed above it, which is the healthy direction.
reth_provider.providers.static_file.manager uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_provider.providers.static_file.manager, while a change to reth_provider.providers.static_file.manager can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_provider.providers.static_file.manager uses a module listed above it, which is the healthy direction.
reth_rpc.eth.core uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_tasks.runtime.
Position
Below the diagonal: reth_rpc.eth.core uses a module listed above it, which is the healthy direction.
reth_rpc.eth.core uses reth_transaction_pool.traits, so a change to reth_transaction_pool.traits can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_transaction_pool.traits.
Position
Below the diagonal: reth_rpc.eth.core uses a module listed above it, which is the healthy direction.
reth_rpc.eth.core uses reth_evm.execute, so a change to reth_evm.execute can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_evm.execute.
Position
Below the diagonal: reth_rpc.eth.core uses a module listed above it, which is the healthy direction.
reth_rpc.eth.core uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_transaction_pool.
Position
Below the diagonal: reth_rpc.eth.core uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_prune_types.segment.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_stages_types.id.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_chainspec.spec.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_api.noop uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_storage_api.noop, while a change to reth_storage_api.noop can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_storage_api.noop uses a module listed above it, which is the healthy direction.
reth_storage_overlay.manager uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_storage_overlay.manager, while a change to reth_storage_overlay.manager can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_storage_overlay.manager uses a module listed above it, which is the healthy direction.
reth_storage_overlay.manager uses reth_trie_common.updates, so a change to reth_trie_common.updates can break reth_storage_overlay.manager, while a change to reth_storage_overlay.manager can't break reth_trie_common.updates.
Position
Below the diagonal: reth_storage_overlay.manager uses a module listed above it, which is the healthy direction.
reth_storage_overlay.manager uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_storage_overlay.manager, while a change to reth_storage_overlay.manager can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_storage_overlay.manager uses a module listed above it, which is the healthy direction.
reth_storage_overlay.manager uses reth_storage_overlay.provider, so a change to reth_storage_overlay.provider can break reth_storage_overlay.manager, while a change to reth_storage_overlay.manager can't break reth_storage_overlay.provider.
Position
Below the diagonal: reth_storage_overlay.manager uses a module listed above it, which is the healthy direction.
reth_storage_rpc_provider uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_storage_rpc_provider, while a change to reth_storage_rpc_provider can't break reth_prune_types.segment.
Position
Below the diagonal: reth_storage_rpc_provider uses a module listed above it, which is the healthy direction.
reth_storage_rpc_provider uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_storage_rpc_provider, while a change to reth_storage_rpc_provider can't break reth_stages_types.id.
Position
Below the diagonal: reth_storage_rpc_provider uses a module listed above it, which is the healthy direction.
reth_storage_rpc_provider uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_storage_rpc_provider, while a change to reth_storage_rpc_provider can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_storage_rpc_provider uses a module listed above it, which is the healthy direction.
reth_storage_rpc_provider uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_storage_rpc_provider, while a change to reth_storage_rpc_provider can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_storage_rpc_provider uses a module listed above it, which is the healthy direction.
reth_storage_rpc_provider uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_storage_rpc_provider, while a change to reth_storage_rpc_provider can't break reth_chainspec.spec.
Position
Below the diagonal: reth_storage_rpc_provider uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_tasks.runtime.
Position
Below the diagonal: reth_engine_tree.tree uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_engine_tree.tree uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_engine_tree.tree uses a module listed above it, which is the healthy direction.
reth_network.network uses reth_network_peers.node_record, so a change to reth_network_peers.node_record can break reth_network.network, while a change to reth_network.network can't break reth_network_peers.node_record.
Position
Below the diagonal: reth_network.network uses a module listed above it, which is the healthy direction.
reth_network.network uses reth_network_api, so a change to reth_network_api can break reth_network.network, while a change to reth_network.network can't break reth_network_api.
Position
Below the diagonal: reth_network.network uses a module listed above it, which is the healthy direction.
reth_network.network uses reth_network.transactions, so a change to reth_network.transactions can break reth_network.network, while a change to reth_network.network can't break reth_network.transactions.
Position
Below the diagonal: reth_network.network uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_db_api.table, so a change to reth_db_api.table can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_db_api.table.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_prune_types.segment.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_stages_types.id.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_tasks.runtime.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_trie_common.hashed_state, so a change to reth_trie_common.hashed_state can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_trie_common.hashed_state.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_trie_common.updates, so a change to reth_trie_common.updates can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_trie_common.updates.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_chainspec.spec.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_rpc_builder uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_rpc_builder, while a change to reth_rpc_builder can't break reth_tasks.runtime.
Position
Below the diagonal: reth_rpc_builder uses a module listed above it, which is the healthy direction.
reth_rpc_builder uses reth_evm.execute, so a change to reth_evm.execute can break reth_rpc_builder, while a change to reth_rpc_builder can't break reth_evm.execute.
Position
Below the diagonal: reth_rpc_builder uses a module listed above it, which is the healthy direction.
reth_rpc_builder uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_rpc_builder, while a change to reth_rpc_builder can't break reth_transaction_pool.
Position
Below the diagonal: reth_rpc_builder uses a module listed above it, which is the healthy direction.
reth_rpc_builder uses reth_rpc.eth.core, so a change to reth_rpc.eth.core can break reth_rpc_builder, while a change to reth_rpc_builder can't break reth_rpc.eth.core.
Position
Below the diagonal: reth_rpc_builder uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_tasks.runtime.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_trie_common.updates, so a change to reth_trie_common.updates can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_trie_common.updates.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_evm.execute, so a change to reth_evm.execute can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_evm.execute.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_storage_overlay.provider, so a change to reth_storage_overlay.provider can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_storage_overlay.provider.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_engine_tree.tree.payload_validator uses reth_engine_tree.tree, so a change to reth_engine_tree.tree can break reth_engine_tree.tree.payload_validator, while a change to reth_engine_tree.tree.payload_validator can't break reth_engine_tree.tree.
Position
Below the diagonal: reth_engine_tree.tree.payload_validator uses a module listed above it, which is the healthy direction.
reth_node_builder.node uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_node_builder.node, while a change to reth_node_builder.node can't break reth_chainspec.spec.
Position
Below the diagonal: reth_node_builder.node uses a module listed above it, which is the healthy direction.
reth_node_builder.node uses reth_evm.execute, so a change to reth_evm.execute can break reth_node_builder.node, while a change to reth_node_builder.node can't break reth_evm.execute.
Position
Below the diagonal: reth_node_builder.node uses a module listed above it, which is the healthy direction.
reth_node_builder.node uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_node_builder.node, while a change to reth_node_builder.node can't break reth_transaction_pool.
Position
Below the diagonal: reth_node_builder.node uses a module listed above it, which is the healthy direction.
reth_node_builder.node uses reth_node_core.node_config, so a change to reth_node_core.node_config can break reth_node_builder.node, while a change to reth_node_builder.node can't break reth_node_core.node_config.
Position
Below the diagonal: reth_node_builder.node uses a module listed above it, which is the healthy direction.
reth_node_builder.node uses reth_rpc_builder, so a change to reth_rpc_builder can break reth_node_builder.node, while a change to reth_node_builder.node can't break reth_rpc_builder.
Position
Below the diagonal: reth_node_builder.node uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_db.implementation.mdbx, so a change to reth_db.implementation.mdbx can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_db.implementation.mdbx.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_prune_types.segment.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_stages_types.id.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_tasks.runtime.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_chainspec.spec.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_provider.providers.database uses reth_provider.providers.database.provider, so a change to reth_provider.providers.database.provider can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_provider.providers.database.provider.
Position
Below the diagonal: reth_provider.providers.database uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_config.config, so a change to reth_config.config can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_config.config.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_db.implementation.mdbx, so a change to reth_db.implementation.mdbx can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_db.implementation.mdbx.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_tasks.runtime, so a change to reth_tasks.runtime can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_tasks.runtime.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_chainspec.spec.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_node_builder.node, so a change to reth_node_builder.node can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_node_builder.node.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_cli_commands.common uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_cli_commands.common, while a change to reth_cli_commands.common can't break reth_provider.providers.database.
Position
Below the diagonal: reth_cli_commands.common uses a module listed above it, which is the healthy direction.
reth_db_common.db_tool uses reth_db_api.table, so a change to reth_db_api.table can break reth_db_common.db_tool, while a change to reth_db_common.db_tool can't break reth_db_api.table.
Position
Below the diagonal: reth_db_common.db_tool uses a module listed above it, which is the healthy direction.
reth_db_common.db_tool uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_db_common.db_tool, while a change to reth_db_common.db_tool can't break reth_chainspec.spec.
Position
Below the diagonal: reth_db_common.db_tool uses a module listed above it, which is the healthy direction.
reth_db_common.db_tool uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_db_common.db_tool, while a change to reth_db_common.db_tool can't break reth_provider.providers.database.
Position
Below the diagonal: reth_db_common.db_tool uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_config.config, so a change to reth_config.config can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_config.config.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_chainspec.spec.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_transaction_pool.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_node_core.node_config, so a change to reth_node_core.node_config can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_node_core.node_config.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.launch.common uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_provider.providers.database.
Position
Below the diagonal: reth_node_builder.launch.common uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_transaction_pool.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_node_core.node_config, so a change to reth_node_core.node_config can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_node_core.node_config.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_rpc.eth.core, so a change to reth_rpc.eth.core can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_rpc.eth.core.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_storage_overlay.manager, so a change to reth_storage_overlay.manager can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_storage_overlay.manager.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_rpc_builder, so a change to reth_rpc_builder can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_rpc_builder.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_node_builder.rpc uses reth_node_builder.node, so a change to reth_node_builder.node can break reth_node_builder.rpc, while a change to reth_node_builder.rpc can't break reth_node_builder.node.
Position
Below the diagonal: reth_node_builder.rpc uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_prune_types.segment.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_stages_types.id.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_chainspec.spec.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_provider.providers.database.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_prune_types.segment, so a change to reth_prune_types.segment can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_prune_types.segment.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_stages_types.id.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_chain_state.in_memory.executed_block, so a change to reth_chain_state.in_memory.executed_block can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_chain_state.in_memory.executed_block.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_chainspec.spec.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_static_file_types.segment, so a change to reth_static_file_types.segment can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_static_file_types.segment.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_provider.providers.consistent uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_provider.providers.consistent, while a change to reth_provider.providers.consistent can't break reth_provider.providers.database.
Position
Below the diagonal: reth_provider.providers.consistent uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_config.config, so a change to reth_config.config can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_config.config.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_chainspec.spec.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_transaction_pool.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_node_core.node_config, so a change to reth_node_core.node_config can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_node_core.node_config.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_network.network, so a change to reth_network.network can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_network.network.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
reth_node_builder.builder uses reth_node_builder.launch.common, so a change to reth_node_builder.launch.common can break reth_node_builder.builder, while a change to reth_node_builder.builder can't break reth_node_builder.launch.common.
Position
Below the diagonal: reth_node_builder.builder uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
25
High / Critical
A03:2025 — Software Supply Chain Failures
15
Medium
A05:2025 — Injection
13
High / Critical
Roadmap
Top priorities: Resolve the 5 Banned license finding(s) in License Compliance; Resolve the 1 finding(s) in DR & Backup; Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 5 Banned license finding(s) in License Compliance.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Code Duplication: Edited copy of a member (25 corresponding lines)
crates/storage/provider/src/test_utils/mock.rs
5.7
Mixed
Code Duplication: Edited copy of a member (3 corresponding lines)
REDACTED
5.8
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.8
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.8
Mixed
Static Analysis (SAST): High: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 31
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1307
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 129
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 57 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 57 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1367 of 1467 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 607 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'rocksdb' is imported (crates/storage/provider/src/bal.rs:11), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'rocksdb' is imported (crates/storage/provider/src/bal.rs:11), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'rocksdb' is imported (crates/storage/provider/src/bal.rs:11), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'rocksdb' is imported (crates/storage/provider/src/bal.rs:11), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go and JavaScript/TypeScript source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go, JavaScript or TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 159 further occurrence(s) are not listed individually; the score already reflects all 199.
Repo exclusion declarations: 3 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
95 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ActiveSession::on_incoming_message at 60. A further 14 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Error::to_err_code at 33 — they are counted neither in the figure above nor in this dimension's score. 6 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/storage/libmdbx-rs/src/error.rs (Error::to_err_code at 33), crates/transaction-pool/src/error.rs (InvalidPoolTransactionError::is_bad_transaction at 26), crates/rpc/rpc-eth-types/src/error/mod.rs (ErrorObject::from at 23), crates/ethereum/cli/src/app.rs (reth_ethereum_cli::app::run_commands_with at 19), crates/stages/types/src/id.rs (StageId::as_str at 18), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 70 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with ActiveSession::on_incoming_message (cyclomatic 60), bench-benchmarkoor-summary.main (cyclomatic 47), ActiveSession::poll (cyclomatic 41). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 6.5 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 137 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 60 down to 60 or less in Cognitive Complexity — start with reth_transaction_pool::maintain::maintain_transaction_pool (cognitive 116), Command::execute (cognitive 102), ActiveSession::poll (cognitive 90). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 7 together lifts Cognitive Complexity from 5.9 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 73 FileTooLong finding(s) in God Classes — start with mod.rs (11), lib.rs (4), provider.rs (3). — One of this dimension's main actionable groups (73 warning-level).
Resolve the 37 ClassTooLong finding(s) in God Classes — start with mod.rs (6), provider.rs (4), manager.rs (3). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 36 MethodTooLong finding(s) in God Classes — start with mod.rs (8), manager.rs (2), provider.rs (2). — One of this dimension's main actionable groups (36 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
247 duplicated block group(s) detected. 3.3 % of the production lines (13,604 of 412,395) are in a reported copy. A further 287 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 33 of the 534 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
Edited copy of a member (12 corresponding lines) · ×25crates/net/eth-wire-types/src/capability.rs:232
Edited copy of a member (13 corresponding lines) · ×16crates/storage/storage-overlay/src/provider.rs:995
+ 154 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 25 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with mod.rs (2), hashed_state.rs (2), capability.rs. — One of this dimension's main actionable groups (25 warning-level).
Resolve the 22 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with writer.rs (2), file_client.rs, mod.rs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 20 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), utils.rs (2), provider.rs (2). — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.4 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
121 production modules (Cargo+npm), 0 dependency cycle(s), 14 unstable depended-on module(s). Read from the build's own module declarations; 25 module(s) off the main sequence, with abstractness counted on 107 of the 121 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: reth-db-models · ×22
Unstable project reth-cli-commands
Unstable project reth-engine-tree
Unstable project reth-engine-util
Unstable project reth-ethereum-cli
+ 11 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 1 Unstable project reth-cli-commands finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project reth-engine-tree finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 12 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (2), config.rs, trace.rs. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
22 outdated, 0 yanked direct Cargo dependencies. 190 of 195 direct crates were graded against crates.io (0 not published there, 5 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: alloy-eip7928 · ×22
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
5 of 945 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 17 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.
Banned license: test-fuzz · ×5
What to do
Resolve the 5 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (5 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: crates/storage/provider/src/providers/database/provider.rs (33×23=759); crates/engine/tree/src/tree/mod.rs (34×21=714); crates/engine/tree/src/tree/payload_validator.rs (25×23=575) Repeated repair below the complexity floor: crates/rpc/ipc/src/server/mod.rs (6 of 10 changes were fixes); crates/storage/provider/src/bal/rocksdb.rs (6 of 9 changes were fixes); crates/cli/commands/src/common.rs (6 of 7 changes were fixes)
Resolve the 46 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (8), lib.rs (3), manager.rs (2). — One of this dimension's main actionable groups (46 warning-level).
Resolve the 20 Repeated repair finding(s) in Churn × Complexity Hotspots — start with error.rs (3), mod.rs (2), lib.rs (2). — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.7 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
21 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/ethereum/node/src/snap/mod.rs. Counted over 828 of the 1135 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
71 deducted task-comment markers across 412395 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 69 TodoComment finding(s) in Explicit Debt — start with main.rs (5), mod.rs (4), manager.rs (3). — One of this dimension's main actionable groups (69 warning-level).
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with engine.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 160 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
Resolve the 1 redundant comment finding(s) in Comment Value — start with inject-cargo-docs.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
13 finding(s): 0 critical, 11 high, 2 medium, 0 low. semgrep hit a parse error in 50 file(s) — `.github/scripts/bench-benchmarkoor-run.sh`, `.github/scripts/bench-state-test.sh`, `.github/scripts/bench-state.sh` (line 10), `.github/scripts/bench-txgen-extract.sh`, `.github/scripts/bench-txgen-run.sh`, … (+45 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 14 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 3 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 13 High IaC finding(s) in IaC & Container Security — start with REDACTED (7), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (13 issue-level).
Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
22 of 828 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/prune/prune/src/limiter.rs. Counted over 828 of the 1135 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 25 Change coupling finding(s) in Change Coupling — start with mem.rs (2), historical.rs (2), execution.rs (2). — One of this dimension's main actionable groups (25 warning-level).
Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with mod.rs, metrics.rs, db.rs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with noop.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Do you agree with this assessment?
AX8 · Test isolation7.5 / 10Strong✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
`reth-rpc-e2e-tests` (production) references the test project `reth-e2e-test-utils`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
What to do
Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
`RpcBlockchainStateProvider.get_account` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — crates/storage/rpc-provider/src/lib.rs:1036
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
What to do
Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
1 public type in `reth_ecies.error` is marked as implementation by its own namespace, folder or name: `ECIESErrorImpl` (crates/net/ecies/src/error.rs:31, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/net/ecies/src/error.rs:31
3 public types in `reth_db.implementation.mdbx` are marked as implementation by their own namespace, folder or name: `DatabaseEnvKind` (crates/storage/db/src/implementation/mdbx/mod.rs:70, `implementation`), `DatabaseArguments` (crates/storage/db/src/implementation/mdbx/mod.rs:86, `implementation`), `DatabaseEnv` (crates/storage/db/src/implementation/mdbx/mod.rs:257, `implementation`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — crates/storage/db/src/implementation/mdbx/mod.rs:70
What to do
Hide `reth_ecies.error` (`ECIESErrorImpl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `reth_db.implementation.mdbx` (`DatabaseEnvKind`, `DatabaseArguments`, `DatabaseEnv`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Only 74/75 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `bun`, `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — .github/dependabot.yml:2
What to do
Dependabot is configured but does not watch `bun`, `cargo` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×6) — crates/cli/commands/src/download/manifest.rs:687, crates/cli/commands/src/download/source.rs:103, crates/cli/commands/src/download/source.rs:167, …
`Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/node/metrics/src/server.rs:254
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves HTTP itself (`Server::builder()` (docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:69)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `Server::builder()` (docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:69).
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `Server::builder()` (docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:69).
What to do
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader2.2 / 10Critical✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`key_length` is read from the bytes being parsed at line 268 (`usize::from_be_bytes`), then used to size a `vec![…; n]` at line 270 — and nowhere in its scope is `key_length` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `key_length` against the bytes actually remaining and a maximum the format allows before allocating. — crates/etl/src/lib.rs:270
`value_length` is read from the bytes being parsed at line 269 (`usize::from_be_bytes`), then used to size a `vec![…; n]` at line 271 — and nowhere in its scope is `value_length` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `value_length` against the bytes actually remaining and a maximum the format allows before allocating. — crates/etl/src/lib.rs:271
`count` is read from the bytes being parsed at line 208 (`i64::from_le_bytes`), then used to size a `Vec::with_capacity` at line 231 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/era/src/e2s/types.rs:231
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`error!` at line 1285 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/trie/trie/src/proof_v2/calculator.rs:1285
`debug!` at line 375 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/maintain.rs:375
`error!` at line 854 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/maintain.rs:854
`debug!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/best.rs:219
`debug!` at line 293 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/listener.rs:293
`debug!` at line 335 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/listener.rs:335
`debug!` at line 768 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/mod.rs:768
`debug!` at line 871 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/mod.rs:871
`debug!` at line 1363 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/mod.rs:1363
`warn!` at line 1365 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/mod.rs:1365
`trace!` at line 1306 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/txpool.rs:1306
`trace!` at line 1318 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/pool/txpool.rs:1318
`trace!` at line 696 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/transaction-pool/src/blobstore/disk.rs:696
`warn!` at line 38 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/tokio-util/src/event_stream.rs:38
`error!` at line 713 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/tasks/src/runtime.rs:713
`error!` at line 782 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/tasks/src/runtime.rs:782
`error!` at line 851 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/tasks/src/runtime.rs:851
`debug!` at line 1095 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/tasks/src/runtime.rs:1095
`debug!` at line 466 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/provider/src/providers/static_file/writer.rs:466
`debug!` at line 481 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/provider/src/providers/static_file/writer.rs:481
`info!` at line 141 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/db-common/src/db_tool/mod.rs:141
`info!` at line 145 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/db-common/src/db_tool/mod.rs:145
`info!` at line 151 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/db-common/src/db_tool/mod.rs:151
`warn!` at line 79 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/db/src/lockfile.rs:79
`warn!` at line 515 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/storage/db/src/implementation/mdbx/mod.rs:515
`info!` at line 322 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/stages/src/stages/hashing_account.rs:322
`info!` at line 263 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/stages/src/stages/hashing_storage.rs:263
`error!` at line 690 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/api/src/pipeline/mod.rs:690
`error!` at line 715 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/api/src/pipeline/mod.rs:715
`error!` at line 745 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/api/src/pipeline/mod.rs:745
`warn!` at line 750 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/stages/api/src/pipeline/mod.rs:750
`error!` at line 29 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/rpc-layer/src/jwt_validator.rs:29
`error!` at line 36 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/rpc-layer/src/jwt_validator.rs:36
`debug!` at line 224 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:224
`trace!` at line 197 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/rpc/src/eth/filter.rs:197
`trace!` at line 514 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/rpc/src/eth/sim_bundle.rs:514
`debug!` at line 183 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/jsonrpsee/server/src/server.rs:183
`trace!` at line 712 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/jsonrpsee/server/src/server.rs:712
`debug!` at line 720 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/jsonrpsee/server/src/server.rs:720
`debug!` at line 756 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rpc/jsonrpsee/server/src/server.rs:756
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
AXH1 Runtime security headers — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXI1 Runtime container hardening — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility (rendered) — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X10 Duplicated predicate — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: this repository stores data through 'rocksdb' (crates/storage/provider/src/bal.rs:11) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
C4 Data Retention — Not assessed: this repository stores data through 'rocksdb' (crates/storage/provider/src/bal.rs:11) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'rocksdb' (crates/storage/provider/src/bal.rs:11) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 58 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX4 Dependency direction — not applicable to a transaction-script/CRUD architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXA1 Runtime unauthenticated reachability — This run crawled public routes only — it had no logged-in session, so there is no authenticated surface to compare anonymous access against and nothing was measured. This is a statement about this run, not about your application: nothing here says access control is missing, and nothing here says it is present.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: this repository stores data through 'rocksdb' (crates/storage/provider/src/bal.rs:11) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
D10 Test Quality — ~38792 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Rust suite
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 206 value object(s); 17 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (401,160 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 0% of this repository's production lines — rust (401,160 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Banned license: test-fuzz — `test-fuzz` 7.3.0 is published on crates.io under `AGPL-3.0 WITH mif-exception`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception.
Banned license: gmp-mpfr-sys — `gmp-mpfr-sys` 1.7.1 is published on crates.io under `LGPL-3.0+`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: test-fuzz-internal — `test-fuzz-internal` 7.3.0 is published on crates.io under `AGPL-3.0 WITH mif-exception`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception.
Banned license: test-fuzz-macro — `test-fuzz-macro` 7.3.0 is published on crates.io under `AGPL-3.0 WITH mif-exception`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception.
Banned license: test-fuzz-runtime — `test-fuzz-runtime` 7.3.0 is published on crates.io under `AGPL-3.0 WITH mif-exception`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception.
AX8 · Test isolation· Production project references a test project · ×1
Production project references a test project: reth-rpc-e2e-tests → reth-e2e-test-utils — `reth-rpc-e2e-tests` (production) references the test project `reth-e2e-test-utils`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
AX9 · CQS / query purity· Query writes persistent state on the read path · ×1
Query writes persistent state on the read path: RpcBlockchainStateProvider.get_account crates/storage/rpc-provider/src/lib.rs:1036— `RpcBlockchainStateProvider.get_account` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
FileTooLong: database/provider.rs crates/storage/provider/src/providers/database/provider.rs— FileTooLong — 2597 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: DatabaseProvider (55 blocks, 164-4194). The bar is 500 significant lines; this is 2097 over it, 5.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: arena/mod.rs crates/trie/sparse/src/arena/mod.rs— FileTooLong — 1816 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: ArenaParallelSparseTrie (6 blocks, 668-3064). The bar is 500 significant lines; this is 1316 over it, 3.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: static_file/manager.rs crates/storage/provider/src/providers/static_file/manager.rs— FileTooLong — 1779 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 89% of them inside a single declaration: StaticFileProvider (18 blocks, 124-3155). The bar is 500 significant lines; this is 1279 over it, 3.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scripts/bench-reth-summary.py .github/scripts/bench-reth-summary.py— FileTooLong — 1767 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1267 over it, 3.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: rocksdb/provider.rs crates/storage/provider/src/providers/rocksdb/provider.rs— FileTooLong — 1688 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1188 over it, 3.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/net/discv4/src/lib.rs— FileTooLong — 1373 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: Discv4Service (4 blocks, 497-2081). The bar is 500 significant lines; this is 873 over it, 2.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs crates/rpc/rpc-builder/src/lib.rs— FileTooLong — 1355 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 855 over it, 2.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: tree/payload_validator.rs crates/engine/tree/src/tree/payload_validator.rs— FileTooLong — 1301 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 801 over it, 2.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pool/txpool.rs crates/transaction-pool/src/pool/txpool.rs— FileTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 774 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/storage/rpc-provider/src/lib.rs— FileTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 764 over it, 2.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: transactions/mod.rs crates/net/network/src/transactions/mod.rs— FileTooLong — 1214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 63% of them inside a single declaration: TransactionsManager (6 blocks, 321-1772). The bar is 500 significant lines; this is 714 over it, 2.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/rpc.rs crates/node/builder/src/rpc.rs— FileTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 630 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/engine_api.rs crates/rpc/rpc-engine-api/src/engine_api.rs— FileTooLong — 1109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: EngineApi (8 blocks, 65-1796). The bar is 500 significant lines; this is 609 over it, 2.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/debug.rs crates/rpc/rpc/src/debug.rs— FileTooLong — 1092 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 87% of them inside a single declaration: DebugApi (6 blocks, 65-1500). The bar is 500 significant lines; this is 592 over it, 2.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: static_file/writer.rs crates/storage/provider/src/providers/static_file/writer.rs— FileTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: StaticFileProviderRW (2 blocks, 235-1812). The bar is 500 significant lines; this is 515 over it, 2.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/execute.rs crates/evm/evm/src/execute.rs— FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 511 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: proof_v2/calculator.rs crates/trie/trie/src/proof_v2/calculator.rs— FileTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: ProofCalculator (3 blocks, 42-1572). The bar is 500 significant lines; this is 410 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: session/mod.rs crates/net/network/src/session/mod.rs— FileTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 405 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/init.rs crates/storage/db-common/src/init.rs— FileTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 405 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: providers/consistent.rs crates/storage/provider/src/providers/consistent.rs— FileTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 96% of them inside a single declaration: ConsistentProvider (19 blocks, 45-1447). The bar is 500 significant lines; this is 405 over it, 1.81× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: pool/mod.rs crates/transaction-pool/src/pool/mod.rs— FileTooLong — 900 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: PoolInner (3 blocks, 140-1413). The bar is 500 significant lines; this is 400 over it, 1.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/peers.rs crates/net/network/src/peers.rs— FileTooLong — 879 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: PeersManager (3 blocks, 58-1472). The bar is 500 significant lines; this is 379 over it, 1.76× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: state_root_strategy/sparse_trie.rs crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs— FileTooLong — 865 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: SparseTrieCacheTask (2 blocks, 119-1235). The bar is 500 significant lines; this is 365 over it, 1.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scripts/bench-call-summary.py .github/scripts/bench-call-summary.py— FileTooLong — 855 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 355 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: launch/common.rs crates/node/builder/src/launch/common.rs— FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: LaunchContextWith (10 blocks, 262-1350). The bar is 500 significant lines; this is 352 over it, 1.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
TodoComment testing/testing-utils/src/generators.rs:3— // TODO(rand): update ::random calls after rand_09 migration — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment testing/testing-utils/src/generators.rs:241— // TODO(onbjerg): Proper EIP-7685 request support
TodoComment examples/bsc-p2p/src/upgrade_status.rs:54— // TODO: support disable_peer_tx_broadcast flag — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/trie/sparse/src/state.rs:1148— // TODO(alexey): assert against real state root calculation updates — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/transaction-pool/src/traits.rs:1657— // TODO: Initialize this with the actual mask once sparse sidecars are supported. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/transaction-pool/src/blobstore/mod.rs:115— // TODO: Initialize this with the actual mask once sparse sidecars are supported. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/transaction-pool/src/pool/blob.rs:411— // TODO: this could be u64: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/transaction-pool/src/pool/txpool.rs:53— // TODO: Inlined diagram due to a bug in aquamarine library, should become an include when it's — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/net/network/src/manager.rs:75— // TODO: Inlined diagram due to a bug in aquamarine library, should become an include when it's — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/tasks/src/runtime.rs:217— // TODO: reserved_cpu_cores is currently ignored because subtracting from thread pool — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/node/builder/src/launch/common.rs:237— // TODO: reserved_cpu_cores is currently ignored because subtracting from thread pool — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/storage-api/src/chain.rs:156— // TODO: Ideally storage should hold its own copy of chain spec — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/either_writer.rs:196— // TODO: support writing receipts to static files with log filter pruning enabled — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/blockchain_provider.rs:2876— // todo(joshie) add canonical_hashes_range below after changing its interface into range — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/blockchain_provider.rs:3249— // TODO: withdrawals, requests, ommers — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/consistent.rs:1068— // TODO: should we only apply this for the RPCs that are listed in EIP-1898?
TodoComment crates/storage/provider/src/providers/static_file/manager.rs:1003— /// [`StaticFileJarProvider`]. TODO(joshie): we should check the size and pop N if there's too — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/static_file/manager.rs:1826— // TODO(joshie): is_block_meta — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/database/provider.rs:2770— // TODO(mediocregopher): This could be rewritten in a way which doesn't — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/database/provider.rs:3118— // TODO: add a `take` method that removes and returns the items instead of doing this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/provider/src/providers/database/provider.rs:3868— /// TODO(joshie): this fn should be moved to `UnifiedStorageWriter` eventually — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/nippy-jar/src/consistency.rs:77— // TODO: ideally we could truncate until the last offset of the last column of the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/nippy-jar/src/lib.rs:256— // TODO(joshie): ensure consistency on unexpected shutdown — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/db-api/src/mock.rs:29— /// TODO: Make the mock database table-aware by properly utilizing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/storage/db-api/src/tables/mod.rs:12— //! TODO(onbjerg): Find appropriate format for this... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Hotspot: crates/storage/provider/src/providers/database/provider.rs crates/storage/provider/src/providers/database/provider.rs:574— crates/storage/provider/src/providers/database/provider.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in DatabaseProvider::save_blocks_inner at line 574. 10 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/providers/database/provider.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/tree/src/tree/mod.rs crates/engine/tree/src/tree/mod.rs:655— crates/engine/tree/src/tree/mod.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in EngineApiTreeHandler::on_engine_message at line 655. 16 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/tree/src/tree/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/tree/src/tree/payload_validator.rs crates/engine/tree/src/tree/payload_validator.rs:470— crates/engine/tree/src/tree/payload_validator.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in BasicEngineValidator::validate_block_with_state at line 470. 9 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/tree/src/tree/payload_validator.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ethereum/node/src/engine_ssz_proxy.rs crates/ethereum/node/src/engine_ssz_proxy.rs:563— crates/ethereum/node/src/engine_ssz_proxy.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in reth_node_ethereum::engine_ssz_proxy::handle_engine_ssz_request at line 563. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/ethereum/node/src/engine_ssz_proxy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc-eth-api/src/helpers/call.rs crates/rpc/rpc-eth-api/src/helpers/call.rs:67— crates/rpc/rpc-eth-api/src/helpers/call.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in EthCall::simulate_v1 at line 67. 12 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-eth-api/src/helpers/call.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/trie/sparse/src/arena/mod.rs crates/trie/sparse/src/arena/mod.rs:1030— crates/trie/sparse/src/arena/mod.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ArenaParallelSparseTrie::update_cached_rlp at line 1030. 5 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/trie/sparse/src/arena/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/storage/storage-overlay/src/manager.rs crates/storage/storage-overlay/src/manager.rs:551— crates/storage/storage-overlay/src/manager.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in OverlayManager::get_or_compute_overlay at line 551. 9 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/storage-overlay/src/manager.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/tree/src/tree/payload_processor/prewarm.rs crates/engine/tree/src/tree/payload_processor/prewarm.rs:325— crates/engine/tree/src/tree/payload_processor/prewarm.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PrewarmCacheTask::transact_worker at line 325. 5 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/tree/src/tree/payload_processor/prewarm.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/transaction-pool/src/validate/eth.rs crates/transaction-pool/src/validate/eth.rs:457— crates/transaction-pool/src/validate/eth.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in EthTransactionValidator::validate_stateless at line 457. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/transaction-pool/src/validate/eth.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc-eth-types/src/cache/mod.rs crates/rpc/rpc-eth-types/src/cache/mod.rs:558— crates/rpc/rpc-eth-types/src/cache/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in EthStateCacheService::poll at line 558. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-eth-types/src/cache/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc/src/eth/filter.rs crates/rpc/rpc/src/eth/filter.rs:480— crates/rpc/rpc/src/eth/filter.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in EthFilterInner::logs_for_filter at line 480. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc/src/eth/filter.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/net/network/src/transactions/mod.rs crates/net/network/src/transactions/mod.rs:1347— crates/net/network/src/transactions/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in TransactionsManager::import_transactions at line 1347. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/net/network/src/transactions/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/transaction-pool/src/maintain.rs crates/transaction-pool/src/maintain.rs:125— crates/transaction-pool/src/maintain.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in reth_transaction_pool::maintain::maintain_transaction_pool at line 125. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/transaction-pool/src/maintain.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/stages/stages/src/stages/execution/mod.rs crates/stages/stages/src/stages/execution/mod.rs:293— crates/stages/stages/src/stages/execution/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ExecutionStage::execute at line 293. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/stages/stages/src/stages/execution/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/transaction-pool/src/pool/txpool.rs crates/transaction-pool/src/pool/txpool.rs:2119— crates/transaction-pool/src/pool/txpool.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AllTransactions::insert_tx at line 2119. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/transaction-pool/src/pool/txpool.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cli/commands/src/download/mod.rs crates/cli/commands/src/download/mod.rs:715— crates/cli/commands/src/download/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in DownloadCommand::resolve_components at line 715. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/cli/commands/src/download/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/snap-sync/src/bootstrap.rs crates/snap-sync/src/bootstrap.rs:127— crates/snap-sync/src/bootstrap.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SnapBootstrap::run at line 127. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/snap-sync/src/bootstrap.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/trie/common/src/proofs.rs crates/trie/common/src/proofs.rs:547— crates/trie/common/src/proofs.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in DecodedMultiProofV2::from_witness_with at line 547. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/trie/common/src/proofs.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc-eth-types/src/simulate.rs crates/rpc/rpc-eth-types/src/simulate.rs:317— crates/rpc/rpc-eth-types/src/simulate.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in reth_rpc_eth_types::simulate::execute_transactions at line 317. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-eth-types/src/simulate.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/node/builder/src/launch/common.rs crates/node/builder/src/launch/common.rs:499— crates/node/builder/src/launch/common.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in LaunchContextWith::create_provider_factory_with_recovery at line 499. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/node/builder/src/launch/common.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc/src/eth/sim_bundle.rs crates/rpc/rpc/src/eth/sim_bundle.rs:276— crates/rpc/rpc/src/eth/sim_bundle.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in EthSimBundle::sim_bundle_inner at line 276. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc/src/eth/sim_bundle.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc-eth-api/src/helpers/pending_block.rs crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:275— crates/rpc/rpc-eth-api/src/helpers/pending_block.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in LoadPendingBlock::build_block at line 275. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-eth-api/src/helpers/pending_block.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc/src/eth/bundle.rs crates/rpc/rpc/src/eth/bundle.rs:59— crates/rpc/rpc/src/eth/bundle.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in EthBundle::call_bundle at line 59. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc/src/eth/bundle.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/storage/provider/src/providers/static_file/manager.rs crates/storage/provider/src/providers/static_file/manager.rs:1735— crates/storage/provider/src/providers/static_file/manager.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in StaticFileProvider::ensure_invariants at line 1735. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/providers/static_file/manager.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/rpc/rpc-eth-api/src/helpers/estimate.rs crates/rpc/rpc-eth-api/src/helpers/estimate.rs:44— crates/rpc/rpc-eth-api/src/helpers/estimate.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in EstimateCall::estimate_gas_with at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-eth-api/src/helpers/estimate.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
ClassTooLong: DatabaseProvider crates/storage/provider/src/providers/database/provider.rs:193— ClassTooLong — 2458 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 55 blocks, lines 164-4194. The bar is 400 significant lines; this is 2058 over it, 6.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StaticFileProvider crates/storage/provider/src/providers/static_file/manager.rs:122— ClassTooLong — 1580 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 18 blocks, lines 124-3155. The bar is 400 significant lines; this is 1180 over it, 3.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ArenaParallelSparseTrie crates/trie/sparse/src/arena/mod.rs:668— ClassTooLong — 1455 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 6 blocks, lines 668-3064. The bar is 400 significant lines; this is 1055 over it, 3.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EngineApi crates/rpc/rpc-engine-api/src/engine_api.rs:65— ClassTooLong — 1058 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 73 methods, 8 blocks, lines 65-1796. The bar is 400 significant lines; this is 658 over it, 2.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DebugApi crates/rpc/rpc/src/debug.rs:65— ClassTooLong — 950 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 6 blocks, lines 65-1500. The bar is 400 significant lines; this is 550 over it, 2.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConsistentProvider crates/storage/provider/src/providers/consistent.rs:45— ClassTooLong — 873 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 19 blocks, lines 45-1447. The bar is 400 significant lines; this is 473 over it, 2.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StaticFileProviderRW crates/storage/provider/src/providers/static_file/writer.rs:235— ClassTooLong — 858 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 2 blocks, lines 235-1812. The bar is 400 significant lines; this is 458 over it, 2.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Discv4Service crates/net/discv4/src/lib.rs:497— ClassTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 4 blocks, lines 497-2081. The bar is 400 significant lines; this is 437 over it, 2.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ProofCalculator crates/trie/trie/src/proof_v2/calculator.rs:42— ClassTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 42-1572. The bar is 400 significant lines; this is 369 over it, 1.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TransactionsManager crates/net/network/src/transactions/mod.rs:321— ClassTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 6 blocks, lines 321-1772. The bar is 400 significant lines; this is 361 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PeersManager crates/net/network/src/peers.rs:58— ClassTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 3 blocks, lines 58-1472. The bar is 400 significant lines; this is 351 over it, 1.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TxPool crates/transaction-pool/src/pool/txpool.rs:94— ClassTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 5 blocks, lines 94-1429. The bar is 400 significant lines; this is 323 over it, 1.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RpcBlockchainStateProvider crates/storage/rpc-provider/src/lib.rs:921— ClassTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 31 blocks, lines 921-1983. The bar is 400 significant lines; this is 296 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PoolInner crates/transaction-pool/src/pool/mod.rs:140— ClassTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 87 methods, 3 blocks, lines 140-1413. The bar is 400 significant lines; this is 295 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OverlayStateProvider crates/storage/storage-overlay/src/provider.rs:162— ClassTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 18 blocks, lines 162-1076. The bar is 400 significant lines; this is 277 over it, 1.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NetworkManager crates/net/network/src/manager.rs:108— ClassTooLong — 655 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 4 blocks, lines 108-1209. The bar is 400 significant lines; this is 255 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SparseTrieCacheTask crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:119— ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 2 blocks, lines 119-1235. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LaunchContextWith crates/node/builder/src/launch/common.rs:262— ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods, 10 blocks, lines 262-1350. The bar is 400 significant lines; this is 223 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RpcAddOns crates/node/builder/src/rpc.rs:531— ClassTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 8 blocks, lines 531-1463. The bar is 400 significant lines; this is 203 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BlockchainProvider crates/storage/provider/src/providers/blockchain_provider.rs:66— ClassTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 31 blocks, lines 66-1160. The bar is 400 significant lines; this is 177 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ProviderFactory crates/storage/provider/src/providers/database/mod.rs:75— ClassTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 21 methods, 26 blocks, lines 75-1020. The bar is 400 significant lines; this is 168 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TransactionFetcher crates/net/network/src/transactions/fetcher.rs:96— ClassTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 4 blocks, lines 96-1153. The bar is 400 significant lines; this is 121 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EthTransactionValidator crates/transaction-pool/src/validate/eth.rs:80— ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 6 blocks, lines 80-1521. The bar is 400 significant lines; this is 100 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TraceApi crates/rpc/rpc/src/trace.rs:49— ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 8 blocks, lines 49-838. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RpcBlockchainProvider crates/storage/rpc-provider/src/lib.rs:133— ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 21 blocks, lines 133-915. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: EthBundle.call_bundle crates/rpc/rpc/src/eth/bundle.rs:59— MethodTooLong — call_bundle runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NetworkManager.on_swarm_event crates/net/network/src/manager.rs:816— MethodTooLong — on_swarm_event runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EngineApiTreeHandler.on_engine_message crates/engine/tree/src/tree/mod.rs:655— MethodTooLong — on_engine_message runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SessionManager.poll_pending_session_event crates/net/network/src/session/mod.rs:589— MethodTooLong — poll_pending_session_event runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ArenaParallelSparseTrie.update_leaves crates/trie/sparse/src/arena/mod.rs:2776— MethodTooLong — update_leaves runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DatabaseProvider.save_blocks_inner crates/storage/provider/src/providers/database/provider.rs:574— MethodTooLong — save_blocks_inner runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StateRoot.calculate crates/trie/trie/src/trie.rs:174— MethodTooLong — calculate runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RpcServerConfig.start crates/rpc/rpc-builder/src/lib.rs:1417— MethodTooLong — start runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultStateRootStrategy.spawn_sparse_trie_task crates/engine/tree/src/tree/state_root_strategy/mod.rs:616— MethodTooLong — spawn_sparse_trie_task runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EthSimBundle.sim_bundle_inner crates/rpc/rpc/src/eth/sim_bundle.rs:276— MethodTooLong — sim_bundle_inner runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Discovery.new crates/net/network/src/discovery.rs:90— MethodTooLong — new runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExecutionStage.execute crates/stages/stages/src/stages/execution/mod.rs:293— MethodTooLong — execute runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Command.static_files_stats_table crates/cli/commands/src/db/stats.rs:223— MethodTooLong — static_files_stats_table runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ChangesetCache.get_or_compute_range crates/storage/storage-overlay/src/changeset_cache.rs:271— MethodTooLong — get_or_compute_range runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ActiveSession.poll crates/net/network/src/session/active.rs:775— MethodTooLong — poll runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: OverlayBuilder.build_state_trie_overlay_at_frontiers crates/storage/storage-overlay/src/builder.rs:429— MethodTooLong — build_state_trie_overlay_at_frontiers runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RuntimeBuilder.build crates/tasks/src/runtime.rs:969— MethodTooLong — build runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ArenaParallelSparseTrie.update_cached_rlp crates/trie/sparse/src/arena/mod.rs:1030— MethodTooLong — update_cached_rlp runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TransactionsManager.import_transactions crates/net/network/src/transactions/mod.rs:1347— MethodTooLong — import_transactions runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TestingApi.build_payload_v1 crates/rpc/rpc/src/testing.rs:118— MethodTooLong — build_payload_v1 runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DatabaseProvider.take_state_above crates/storage/provider/src/providers/database/provider.rs:3076— MethodTooLong — take_state_above runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MerkleStage.execute crates/stages/stages/src/stages/merkle.rs:192— MethodTooLong — execute runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProofCalculator.next_uncached_key_range crates/trie/trie/src/proof_v2/calculator.rs:971— MethodTooLong — next_uncached_key_range runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Command.execute crates/cli/commands/src/db/get.rs:133— MethodTooLong — execute runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TrieWitness.compute crates/trie/trie/src/witness.rs:88— MethodTooLong — compute runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: EngineApiTreeHandler crates/engine/tree/src/tree/mod.rs:254— TooManyMethods — 89 methods, declared across 7 files: tree/persist.rs (15), tree/insert.rs (14), tree/canonical.rs (13), tree/mod.rs (13), +3 more file(s). The bar is 30 methods; this is 59 over it, 2.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PoolInner crates/transaction-pool/src/pool/mod.rs:140— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TreeConfig crates/engine/primitives/src/config.rs:117— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: EngineApi crates/rpc/rpc-engine-api/src/engine_api.rs:65— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LaunchContextWith crates/node/builder/src/launch/common.rs:262— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Discv4Service crates/net/discv4/src/lib.rs:497— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PeersManager crates/net/network/src/peers.rs:58— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StaticFileProvider crates/storage/provider/src/providers/static_file/manager.rs:122— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StaticFileProviderRW crates/storage/provider/src/providers/static_file/writer.rs:235— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TxPool crates/transaction-pool/src/pool/txpool.rs:94— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NetworkConfigBuilder crates/net/network/src/config.rs:193— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultRpcServerArgs crates/node/core/src/args/rpc_server.rs:55— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RocksDBProvider crates/storage/provider/src/providers/rocksdb/provider.rs:519— TooManyMethods — 48 methods, declared across 2 files: rocksdb/provider.rs (43), rocksdb/invariants.rs (5). The bar is 30 methods; this is 18 over it, 1.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: EthApiBuilder crates/rpc/rpc/src/eth/builder.rs:31— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CanonicalInMemoryState crates/chain-state/src/in_memory/canonical.rs:168— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DatabaseProvider crates/storage/provider/src/providers/database/provider.rs:193— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Runtime crates/tasks/src/runtime.rs:365— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: EthTransactionValidator crates/transaction-pool/src/validate/eth.rs:80— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Chain crates/evm/execution-types/src/chain.rs:30— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NodeConfig crates/node/core/src/node_config.rs:91— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SparseStateTrie crates/trie/sparse/src/state.rs:35— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Cursor crates/storage/libmdbx-rs/src/cursor.rs:17— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NetworkManager crates/net/network/src/manager.rs:108— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ExecutionOutcome crates/evm/execution-types/src/execution_outcome.rs:49— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultEngineValues crates/node/core/src/args/engine.rs:28— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: disk.rs ↔ noop.rs crates/transaction-pool/src/blobstore/disk.rs:1— `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/noop.rs` change together 100% of the time (11 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `ea10653e` fix(net): decode wire bitvectors into typed blob cell masks (#27089); `71e5cc84` feat(txpool): track blob cell availability (#25463); `d769d96f` feat(engine): add has blobs rpc (#25589) — run `git show` on any of them.
Change coupling: mem.rs ↔ noop.rs crates/transaction-pool/src/blobstore/mem.rs:1— `crates/transaction-pool/src/blobstore/mem.rs` and `crates/transaction-pool/src/blobstore/noop.rs` change together 100% of the time (11 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `ea10653e` fix(net): decode wire bitvectors into typed blob cell masks (#27089); `71e5cc84` feat(txpool): track blob cell availability (#25463); `d769d96f` feat(engine): add has blobs rpc (#25589) — run `git show` on any of them.
Change coupling: historical.rs ↔ latest.rs crates/storage/provider/src/providers/state/historical.rs:1— `crates/storage/provider/src/providers/state/historical.rs` and `crates/storage/provider/src/providers/state/latest.rs` change together 83% of the time (29 of the 35 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 29 shared commits counted here, the most recent 3 are `c9cf89ff` feat(rpc): make V2 multiproofs the default (#26851); `a05960ab` feat(stateless): make witness generation conform to the draft specs (…; `bab6c3fe` feat(trie): Use proof v2 in TrieWitness (#22922) — run `git show` on any of them.
Change coupling: execution.rs ↔ merkle.rs crates/cli/commands/src/stage/dump/execution.rs:1— `crates/cli/commands/src/stage/dump/execution.rs` and `crates/cli/commands/src/stage/dump/merkle.rs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `dc22ece4` fix(cli): use HeaderTy for stage dump headers (#23274); `370a548f` refactor(db): derive Clone for DatabaseEnv (#21641); `412f39e2` chore(consensus): Remove associated type `Consensus::Error` (#20843) — run `git show` on any of them.
Change coupling: rpc_state_cache.rs ↔ config.rs crates/node/core/src/args/rpc_state_cache.rs:1— `crates/node/core/src/args/rpc_state_cache.rs` and `crates/rpc/rpc-eth-types/src/cache/config.rs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `fa167700` feat(rpc): add cache byte limits and idle eviction (#27351); `18e6014a` feat(rpc): prewarm BAL cache from local replay (#24097); `b77a6bfd` refactor(rpc): remove dead header cache (#26836) — run `git show` on any of them.
Change coupling: historical.rs ↔ trie.rs crates/storage/provider/src/providers/state/historical.rs:1— `crates/storage/provider/src/providers/state/historical.rs` and `crates/storage/storage-api/src/trie.rs` change together 67% of the time (18 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `c9cf89ff` feat(rpc): make V2 multiproofs the default (#26851); `a05960ab` feat(stateless): make witness generation conform to the draft specs (…; `fc7a3e5b` chore: use shorter map names (#14445) — run `git show` on any of them.
Change coupling: either.rs ↔ noop.rs crates/evm/evm/src/either.rs:1— `crates/evm/evm/src/either.rs` and `crates/evm/evm/src/noop.rs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `4f73e1a4` chore: remove `BatchExecutor` (#14453) (at that commit the files were still `crates/evm/src/either.rs` and `crates/evm/src/noop.rs`); `5fcefcea` refactor: remove `PruneModes` from batch executor (#14025) (at that commit the files were still `crates/evm/src/either.rs` and `crates/evm/src/noop.rs`); `af1eb610` feat(perf): integrate OnStateHook in executor (#11345) (at that commit the files were still `crates/evm/src/either.rs` and `crates/evm/src/noop.rs`) — run `git show` on any of them.
Change coupling: mock.rs ↔ noop.rs crates/storage/provider/src/test_utils/mock.rs:1— `crates/storage/provider/src/test_utils/mock.rs` and `crates/storage/provider/src/test_utils/noop.rs` change together 62% of the time (23 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `7764b9a0` chore: add `OmmersProvider` trait (#13331); `62e2cbfe` chore: remove unused evm env provider fns (#13272); `c9c6eb5a` chore: rm unused evm provider fn (#13184) — run `git show` on any of them.
Change coupling: latest.rs ↔ mock.rs crates/storage/provider/src/providers/state/latest.rs:1— `crates/storage/provider/src/providers/state/latest.rs` and `crates/storage/provider/src/test_utils/mock.rs` change together 60% of the time (21 of the 35 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `c9cf89ff` feat(rpc): make V2 multiproofs the default (#26851); `a05960ab` feat(stateless): make witness generation conform to the draft specs (…; `21cf573d` fix: move `bytecode_by_hash` from `StateProvider` to a dedicated `Byt… — run `git show` on any of them.
Change coupling: index_storage_history.rs ↔ provider.rs crates/stages/stages/src/stages/index_storage_history.rs:1— `crates/stages/stages/src/stages/index_storage_history.rs` and `crates/storage/provider/src/providers/database/provider.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `7744d20c` test(storage): remove redundant tests (#27829); `effa0ab4` fix(provider): read changesets from static files during unwind (#21528); `ab418642` fix(stages): commit RocksDB batches before flush and configure immedi… — run `git show` on any of them.
Change coupling: cache.rs ↔ storage.rs crates/exex/exex/src/wal/cache.rs:1— `crates/exex/exex/src/wal/cache.rs` and `crates/exex/exex/src/wal/storage.rs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e882d00f` feat(exex): WAL metrics (#11431); `9c041d25` fix(exex): set next file ID when creating WAL storage (#11372); `bf679b43` feat(exex): finalize WAL below the given block (#11324) — run `git show` on any of them.
Change coupling: lib.rs ↔ lib.rs crates/ethereum/payload/src/lib.rs:1— `crates/ethereum/payload/src/lib.rs` and `crates/payload/builder/src/lib.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `559b0b9f` refactor(payload): store recovered block in built payload (#24403); `044db3ec` feat: implement try into v6 (#23497); `ddc9375a` chore: remove executed_block from EthBuiltPayload (#14017) — run `git show` on any of them.
Change coupling: lib.rs ↔ test_utils.rs crates/ethereum/payload/src/lib.rs:1— `crates/ethereum/payload/src/lib.rs` and `crates/payload/builder/src/test_utils.rs` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `559b0b9f` refactor(payload): store recovered block in built payload (#24403); `044db3ec` feat: implement try into v6 (#23497); `ddc9375a` chore: remove executed_block from EthBuiltPayload (#14017) — run `git show` on any of them.
Change coupling: noop.rs ↔ trie.rs crates/storage/provider/src/test_utils/noop.rs:1— `crates/storage/provider/src/test_utils/noop.rs` and `crates/storage/storage-api/src/trie.rs` change together 56% of the time (15 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `a0f99df2` feat(trie): `StorageRootProvider::storage_multiproof` (#12879); `548f5b9c` feat(trie): expose storage proofs (#11550); `06dbd3a6` feat(trie): expose multiproof via `StateProofProvider` (#10915) — run `git show` on any of them.
Change coupling: import_era.rs ↔ lib.rs crates/cli/commands/src/import_era.rs:1— `crates/cli/commands/src/import_era.rs` and `crates/era-utils/src/lib.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e2563b7a` feat: add -`-with-receipts` to `import-era` to store receipts (#26436); `535bf429` feat(era): extend import to era file (#25404); `256ceb66` feat(cli): support ERE (.erae) files in import-era (#25122) — run `git show` on any of them.
Change coupling: blockchain_provider.rs ↔ noop.rs crates/storage/provider/src/providers/blockchain_provider.rs:1— `crates/storage/provider/src/providers/blockchain_provider.rs` and `crates/storage/storage-api/src/noop.rs` change together 51% of the time (23 of the 45 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `eb1214b5` perf: share pending block and receipts (#27427); `6165a999` refactor(provider): remove historical state conversion (#26904); `2125dc6b` refactor(storage): move OverlayStateProvider and let it use a Provide… — run `git show` on any of them.
Change coupling: mem.rs ↔ noop.rs crates/transaction-pool/src/blobstore/mem.rs:1— `crates/transaction-pool/src/blobstore/mem.rs` and `crates/transaction-pool/src/noop.rs` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `ea10653e` fix(net): decode wire bitvectors into typed blob cell masks (#27089); `71e5cc84` feat(txpool): track blob cell availability (#25463); `d769d96f` feat(engine): add has blobs rpc (#25589) — run `git show` on any of them.
Change coupling: chain_info.rs ↔ mod.rs crates/chain-state/src/chain_info.rs:1— `crates/chain-state/src/chain_info.rs` and `crates/storage/provider/src/providers/mod.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `caac226c` chore: make CanonicalInMemoryState generic over sealed header and blo…; `1ba631ba` feat: store safe block num as well (#11648); `d9936a96` Use more appropriate names for forkchoice subscriptions (#10401) — run `git show` on any of them.
Change coupling: manager.rs ↔ cache.rs crates/exex/exex/src/manager.rs:1— `crates/exex/exex/src/manager.rs` and `crates/exex/exex/src/wal/cache.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `565fd4d1` chore(exex): emit warn log when WAL grows beyond a certain number of …; `e882d00f` feat(exex): WAL metrics (#11431); `bf679b43` feat(exex): finalize WAL below the given block (#11324) — run `git show` on any of them.
Change coupling: test_utils.rs ↔ lib.rs crates/ethereum/evm/src/test_utils.rs:1— `crates/ethereum/evm/src/test_utils.rs` and `crates/evm/evm/src/lib.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0df9791b` chore: bump alloy-evm to 0.28.0 (#22636); `6a50aa3e` feat: make more EVM and RPC conversions fallible (#18685); `f5c2502f` feat: delay block -> payload conversions (#17681) — run `git show` on any of them.
Change coupling: blockchain_provider.rs ↔ changeset_cache.rs crates/storage/provider/src/providers/blockchain_provider.rs:1— `crates/storage/provider/src/providers/blockchain_provider.rs` and `crates/storage/storage-overlay/src/changeset_cache.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `1721c6a0` fix(storage): don't cache snap trie reverts (#28401); `7744d20c` test(storage): remove redundant tests (#27829); `835e4286` perf(trie): skip historical trie changesets with complete overlays (#… — run `git show` on any of them.
Change coupling: mod.rs ↔ sidebar-cli-reth.ts crates/cli/commands/src/db/mod.rs:1— `crates/cli/commands/src/db/mod.rs` and `docs/vocs/sidebar-cli-reth.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `03a308da` feat(cli): add `reth db migrate-v2` for v1→v2 storage migration (#23422); `ce2a194f` feat(cli): add db stage-checkpoints command (#22579); `56bbb3ce` feat(cli): add `reth db prune-checkpoints` command (#22288) — run `git show` on any of them.
Change coupling: execution.rs ↔ common.rs crates/cli/commands/src/stage/dump/execution.rs:1— `crates/cli/commands/src/stage/dump/execution.rs` and `crates/node/builder/src/launch/common.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `e20e56b7` feat: add `Metadata` table and `StorageSettings` to `ProviderFactory`…; `1ba12aee` chore: remove `NoopBlockExecutorProvider` (#16060); `980e62a5` chore: relax `ProviderFactory` setup (#13254) — run `git show` on any of them.
Change coupling: engine_store.rs ↔ engine_api.rs crates/engine/util/src/engine_store.rs:1— `crates/engine/util/src/engine_store.rs` and `crates/rpc/rpc-engine-api/src/engine_api.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `881500e5` feat(rpc, reth-bench): `reth_newPayload` methods for reth-bench (#22…; `e468d4d7` feat: add `ExecutionData` AT (#14179); `04c1d712` refactor: couple ExecutionPayload and ExecutionPayloadSidecar (#14172) — run `git show` on any of them.
Change coupling: engine_store.rs ↔ reorg.rs crates/engine/util/src/engine_store.rs:1— `crates/engine/util/src/engine_store.rs` and `crates/engine/util/src/reorg.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `098ca328` fix(tracing): preserve context across engine and worker tasks (#27529); `e468d4d7` feat: add `ExecutionData` AT (#14179); `04c1d712` refactor: couple ExecutionPayload and ExecutionPayloadSidecar (#14172) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×25
Edited copy of a member (12 corresponding lines) crates/net/eth-wire-types/src/capability.rs:232— crates/net/eth-wire-types/src/capability.rs:232-243 | crates/net/eth-wire-types/src/capability.rs:361-374 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/node/core/src/args/database.rs:127— crates/node/core/src/args/database.rs:127-143 | crates/node/core/src/args/debug.rs:289-300 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/cli/commands/src/download/tui.rs:228— crates/cli/commands/src/download/tui.rs:228-239 | crates/cli/commands/src/download/tui.rs:241-252 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/db/src/implementation/mdbx/mod.rs:318— crates/storage/db/src/implementation/mdbx/mod.rs:318-329 | crates/storage/db/src/implementation/mdbx/mod.rs:331-342 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:102— crates/storage/provider/src/providers/static_file/writer.rs:102-117 | crates/storage/provider/src/providers/static_file/writer.rs:120-131 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:51— docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:51-62 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:53-64 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/net/eth-wire-types/src/version.rs:135— crates/net/eth-wire-types/src/version.rs:135-146 | crates/net/eth-wire-types/src/version.rs:162-173 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/common/src/hashed_state.rs:260— crates/trie/common/src/hashed_state.rs:260-271 | crates/trie/common/src/hashed_state.rs:276-287 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/rpc-provider/src/lib.rs:306— crates/storage/rpc-provider/src/lib.rs:306-317 | crates/storage/rpc-provider/src/lib.rs:1430-1441 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/rpc/ipc/src/server/mod.rs:259— crates/rpc/ipc/src/server/mod.rs:259-270 | crates/rpc/jsonrpsee/server/src/server.rs:944-960 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/evm/evm/src/engine.rs:194— crates/evm/evm/src/engine.rs:194-205 | crates/evm/evm/src/execute.rs:1597-1608 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/transaction-pool/src/traits.rs:200— crates/transaction-pool/src/traits.rs:200-211 | crates/transaction-pool/src/traits.rs:218-229 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/trie/src/changesets.rs:90— crates/trie/trie/src/changesets.rs:90-102 | crates/trie/trie/src/changesets.rs:118-129 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/snap-sync/src/bootstrap.rs:516— crates/snap-sync/src/bootstrap.rs:516-527 | crates/snap-sync/src/common/download.rs:82-93 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/parallel/src/state_root_task.rs:327— crates/trie/parallel/src/state_root_task.rs:327-338 | crates/trie/parallel/src/state_root_task.rs:342-353 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/provider/src/bal/rocksdb.rs:217— crates/storage/provider/src/bal/rocksdb.rs:217-229 | crates/storage/storage-api/src/bal.rs:85-96 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/common/src/trie_node_v2.rs:221— crates/trie/common/src/trie_node_v2.rs:221-233 | crates/trie/common/src/trie_node_v2.rs:235-246 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/node/core/src/args/pruning.rs:332— crates/node/core/src/args/pruning.rs:332-343 | crates/node/core/src/args/pruning.rs:372-385 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/common/src/hashed_state.rs:501— crates/trie/common/src/hashed_state.rs:501-512 | crates/trie/common/src/updates.rs:576-587 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/rpc/rpc-eth-api/src/helpers/call.rs:722— crates/rpc/rpc-eth-api/src/helpers/call.rs:722-733 | crates/rpc/rpc-eth-api/src/helpers/estimate.rs:285-300 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:137— crates/trie/trie/src/hashed_cursor/post_state.rs:137-148 | crates/trie/trie/src/trie_cursor/in_memory.rs:97-108 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/node/builder/src/rpc.rs:871— crates/node/builder/src/rpc.rs:871-892 | crates/rpc/rpc-builder/src/lib.rs:230-241 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/provider/src/test_utils/blocks.rs:128— crates/storage/provider/src/test_utils/blocks.rs:128-139 | crates/storage/provider/src/test_utils/blocks.rs:143-154 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/storage/provider/src/test_utils/mock.rs:739— crates/storage/provider/src/test_utils/mock.rs:739-750 | crates/storage/provider/src/test_utils/mock.rs:755-771 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/e2e-test-utils/src/network.rs:43— crates/e2e-test-utils/src/network.rs:43-56 | crates/net/network/src/test_utils/testnet.rs:626-637 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 2) crates/net/downloaders/src/file_client.rs:258— crates/net/downloaders/src/file_client.rs:258-265 | crates/net/downloaders/src/receipt_file_client.rs:90-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/downloaders/src/file_client.rs:258` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/net/downloaders/src/file_client.rs:256` calls `clone` and `crates/net/downloaders/src/receipt_file_client.rs:88` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) crates/node/builder/src/builder/mod.rs:274— crates/node/builder/src/builder/mod.rs:274-281 | crates/node/builder/src/builder/mod.rs:298-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/rpc/rpc-eth-types/src/gas_oracle.rs:144— crates/rpc/rpc-eth-types/src/gas_oracle.rs:144-151 | crates/rpc/rpc-eth-types/src/gas_oracle.rs:302-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/rpc/rpc/src/eth/bundle.rs:192— crates/rpc/rpc/src/eth/bundle.rs:192-199 | crates/rpc/rpc/src/eth/sim_bundle.rs:339-346 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) crates/storage/provider/src/providers/blockchain_provider.rs:311— crates/storage/provider/src/providers/blockchain_provider.rs:311-318 | crates/storage/provider/src/providers/blockchain_provider.rs:367-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/blockchain_provider.rs:311` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/storage/provider/src/providers/database/provider.rs:1422— crates/storage/provider/src/providers/database/provider.rs:1422-1429 | crates/storage/provider/src/providers/rocksdb/provider.rs:1661-1669 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:1422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:103— crates/storage/provider/src/providers/static_file/writer.rs:103-110 | crates/storage/provider/src/providers/static_file/writer.rs:121-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:553— crates/storage/provider/src/providers/static_file/writer.rs:553-560 | crates/storage/provider/src/providers/static_file/writer.rs:635-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/writer.rs:553` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/tasks/src/pool.rs:271— crates/tasks/src/pool.rs:271-278 | crates/tasks/src/pool.rs:288-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/tasks/src/pool.rs:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/tracing-otlp/src/otlp.rs:63— crates/tracing-otlp/src/otlp.rs:63-70 | crates/tracing-otlp/src/otlp.rs:105-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/transaction-pool/src/pool/state.rs:106— crates/transaction-pool/src/pool/state.rs:106-113 | crates/transaction-pool/src/pool/state.rs:122-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/state.rs:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/trie/common/src/updates.rs:188— crates/trie/common/src/updates.rs:188-195 | crates/trie/common/src/updates.rs:351-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/updates.rs:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/trie/trie/src/trie.rs:279— crates/trie/trie/src/trie.rs:279-286 | crates/trie/trie/src/trie.rs:850-857 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/trie.rs:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/era-utils/src/history.rs:813— crates/era-utils/src/history.rs:813-820 | crates/stages/stages/src/stages/headers.rs:146-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era-utils/src/history.rs:813` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/stages/stages/src/stages/index_account_history.rs:167— crates/stages/stages/src/stages/index_account_history.rs:167-175 | crates/stages/stages/src/stages/index_storage_history.rs:171-178 — before extracting anything, compare `crates/stages/stages/src/stages/index_account_history.rs` and `crates/stages/stages/src/stages/index_storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/index_account_history.rs:167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/transaction-pool/src/pool/parked.rs:397— crates/transaction-pool/src/pool/parked.rs:397-404 | crates/transaction-pool/src/pool/pending.rs:714-721 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) crates/node/builder/src/launch/debug.rs:227— crates/node/builder/src/launch/debug.rs:227-237 | crates/node/builder/src/launch/debug.rs:254-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/cli/commands/src/db/stats.rs:97— crates/cli/commands/src/db/stats.rs:97-107 | crates/storage/db/src/implementation/mdbx/mod.rs:385-392 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:318— crates/stages/stages/src/stages/hashing_account.rs:318-325 | crates/stages/stages/src/stages/hashing_storage.rs:259-266 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/hashing_account.rs:318` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `channels` to `&mut Vec<Receiver<(RawKey<B256>, RawValue<Account>)>>` in one and `&mut Vec<Receiver<(Vec<u8>, CompactU256)>>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) crates/trie/common/src/hashed_state.rs:1816— crates/trie/common/src/hashed_state.rs:1816-1823 | crates/trie/common/src/updates.rs:1534-1541 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/hashed_state.rs:1816` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:386— crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:386-393 | crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:418-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/cli/commands/src/test_vectors/compact.rs:150— crates/cli/commands/src/test_vectors/compact.rs:150-157 | crates/cli/commands/src/test_vectors/tables.rs:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Off the main sequence: reth-db-models — reth-db-models: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: reth-lru — reth-lru: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: reth-metrics — reth-metrics: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 28 project(s), so it's rigid to change.
Off the main sequence: reth-net-banlist — reth-net-banlist: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: reth-net-nat — reth-net-nat: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: reth-network-peers — reth-network-peers: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
Off the main sequence: reth-prune-types — reth-prune-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
Off the main sequence: reth-tokio-util — reth-tokio-util: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: reth-stages-types — reth-stages-types: abstractness 0.00, instability 0.06, distance 0.94 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
Off the main sequence: reth-tasks — reth-tasks: abstractness 0.03, instability 0.03, distance 0.94 — zone of pain — concrete and depended on by 29 project(s), so it's rigid to change.
Off the main sequence: reth-static-file-types — reth-static-file-types: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
Off the main sequence: reth-storage-errors — reth-storage-errors: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
Off the main sequence: reth-execution-errors — reth-execution-errors: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: reth-era — reth-era: abstractness 0.15, instability 0.00, distance 0.85 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: reth-execution-types — reth-execution-types: abstractness 0.08, instability 0.10, distance 0.82 — zone of pain — concrete and depended on by 19 project(s), so it's rigid to change.
Off the main sequence: reth-cli-runner — reth-cli-runner: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: reth-etl — reth-etl: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: reth-ecies — reth-ecies: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: reth-ethereum-forks — reth-ethereum-forks: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
Off the main sequence: reth-cli-util — reth-cli-util: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: reth-network-types — reth-network-types: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: reth-tracing — reth-tracing: abstractness 0.13, instability 0.17, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Repeated repair: crates/rpc/ipc/src/server/mod.rs crates/rpc/ipc/src/server/mod.rs:117— crates/rpc/ipc/src/server/mod.rs changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is IpcServer::start_inner at line 117), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(rpc): don't panic on oversized sub ack (#28485)”; “fix(ipc): enforce socket permissions (#28326)”; “fix: avoid Etherscan and IPC payload dumps (#27990)”; “fix(ipc): stop buffering oversized requests (#27864)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/ipc/src/server/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/provider/src/bal/rocksdb.rs crates/storage/provider/src/bal/rocksdb.rs:126— crates/storage/provider/src/bal/rocksdb.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is RocksDBBalStore::read_one_by_hash at line 126), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: cap BAL retention at bodies prune distance (#28529)”; “revert: "fix(storage): revert BAL store activation" (#27472)”; “fix(storage): open legacy BAL databases read-only (#27471)”; “fix(storage): revert BAL store activation (#27470)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/bal/rocksdb.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/cli/commands/src/common.rs crates/cli/commands/src/common.rs:98— crates/cli/commands/src/common.rs changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is EnvironmentArgs::init at line 98), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(stages): resume interrupted pipeline unwinds (#28067)”; “fix(cli): error on unloadable config and missing enode key (#27982)”; “revert: "fix(storage): revert BAL store activation" (#27472)”; “fix(storage): revert BAL store activation (#27470)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/cli/commands/src/common.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/cli/commands/src/download/manifest.rs crates/cli/commands/src/download/manifest.rs:710— crates/cli/commands/src/download/manifest.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is reth_cli_commands::download::manifest::generate_manifest at line 710), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): reject zero blocks per archive (#28328)”; “fix(cli): reject download output paths that escape the datadir (#28247)”; “fix: align snapshot block counts and downloads (#28058)”; “fix(cli): validate manifest input and fail closed on symlink check (#27983)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/cli/commands/src/download/manifest.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/net/network/src/swarm.rs crates/net/network/src/swarm.rs:249— crates/net/network/src/swarm.rs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is Swarm::on_state_action at line 249), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(net): pick the receipts request by negotiated eth version (#28441)”; “fix(net): reject banned and untrusted inbound peers before session activation (#28360)”; “fix(net): give pending sessions and the listener a turn under load (#28332)”; “fix(net): invalidate superseded dial events (#27950)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/net/network/src/swarm.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/provider/src/providers/static_file/mod.rs crates/storage/provider/src/providers/static_file/mod.rs:36— crates/storage/provider/src/providers/static_file/mod.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is LoadedJar::new at line 36), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(provider): defer static file truncation on reorg (#28370)”; “fix(storage): propagate static-file read errors (#28064)”; “fix(nippy-jar): end last value at its offset (#27678)”; “chore: fix latest nightly clippy lints (#26985)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/providers/static_file/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/nippy-jar/src/lib.rs crates/storage/nippy-jar/src/lib.rs:255— crates/storage/nippy-jar/src/lib.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is NippyJar::delete at line 255), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(nippy-jar): truncate the offsets file when creating a jar (#28468)”; “fix(storage): resume interrupted jar initialization (#28405)”; “fix(nippy-jar): end last value at its offset (#27678)”; “fix(nippy-jar): handle uncommitted rows in prune_rows (#27719)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/nippy-jar/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/provider/src/providers/static_file/writer.rs crates/storage/provider/src/providers/static_file/writer.rs:392— crates/storage/provider/src/providers/static_file/writer.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is StaticFileProviderRW::heal_changeset_sidecar at line 392), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(static-file): reopen the file holding last_block after truncating rows (#28466)”; “fix(storage): resume interrupted jar initialization (#28405)”; “fix(provider): defer static file truncation on reorg (#28370)”; “fix(static-file): name segment and anchor in unwind error (#28164)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/providers/static_file/writer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/nippy-jar/src/writer.rs crates/storage/nippy-jar/src/writer.rs:282— crates/storage/nippy-jar/src/writer.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is NippyJarWriter::prune_rows_deferred at line 282), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(nippy-jar): truncate the offsets file when creating a jar (#28468)”; “fix(storage): resume interrupted jar initialization (#28405)”; “fix(provider): defer static file truncation on reorg (#28370)”; “fix(nippy-jar): handle uncommitted rows in prune_rows (#27719)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/nippy-jar/src/writer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/provider/src/providers/rocksdb/metrics.rs crates/storage/provider/src/providers/rocksdb/metrics.rs:79— crates/storage/provider/src/providers/rocksdb/metrics.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is RocksDBOperation::as_str at line 79), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “revert: "fix(storage): revert BAL store activation" (#27472)”; “fix(storage): revert BAL store activation (#27470)”; “revert: restore RocksDB BAL storage (#26789)”; “revert: "feat(storage): re-enable RocksDB BAL storage" (#26788)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/provider/src/providers/rocksdb/metrics.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/node/core/src/args/txpool.rs crates/node/core/src/args/txpool.rs:66— crates/node/core/src/args/txpool.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is DefaultTxPoolValues::try_init at line 66), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(txpool): apply min priority fee to legacy txs (#27720)”; “fix(txpool): reject transactions below tracked nonce (#26981)”; “fix(txpool): reject zero transaction batch size (#26806)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/node/core/src/args/txpool.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/storage/libmdbx-rs/src/txn_manager.rs crates/storage/libmdbx-rs/src/txn_manager.rs:278— crates/storage/libmdbx-rs/src/txn_manager.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is ReadTransactions::start_monitor at line 278), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(libmdbx): avoid lock inversion in read tx timeout monitor (#28254)”; “fix(mdbx): stop read monitor on environment drop (#28404)”; “test: replace fixed sleeps in libmdbx and session tests (#27960)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/storage/libmdbx-rs/src/txn_manager.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/cli/commands/src/download/extract.rs crates/cli/commands/src/download/extract.rs:379— crates/cli/commands/src/download/extract.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is reth_cli_commands::download::extract::streaming_download_and_extract at line 379), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): reject download output paths that escape the datadir (#28247)”; “fix(cli): validate manifest input and fail closed on symlink check (#27983)”; “fix(download): restore custom static files directory handling (#27065)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/cli/commands/src/download/extract.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/transaction-pool/src/validate/task.rs crates/transaction-pool/src/validate/task.rs:59— crates/transaction-pool/src/validate/task.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ValidationTask::run at line 59), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(txpool): remove validation producer mutex (#27361)”; “fix(txpool): scale validation channel capacity with worker count (#27362)”; “fix(transaction-pool): release receiver lock before validating (#27015)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/transaction-pool/src/validate/task.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/cli/commands/src/download/source.rs crates/cli/commands/src/download/source.rs:206— crates/cli/commands/src/download/source.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is reth_cli_commands::download::source::resolve_manifest_base_url at line 206), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): strip control characters from the snapshot listing (#28470)”; “fix(cli): reject zero blocks per archive (#28328)”; “fix(cli): reject download output paths that escape the datadir (#28247)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/cli/commands/src/download/source.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/engine/primitives/src/error.rs crates/engine/primitives/src/error.rs:114— crates/engine/primitives/src/error.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is InsertBlockErrorKind::ensure_validation_error at line 114), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine): report payload job start errors (#28015)”; “fix(engine): return invalid for undecodable block access lists (#26889)”; “fix(engine): separate malformed input from fatal errors (#26829)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/primitives/src/error.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/consensus/consensus/src/lib.rs crates/consensus/consensus/src/lib.rs:174— crates/consensus/consensus/src/lib.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is HeaderValidator::validate_header_range at line 174), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(consensus): reject pre-Shanghai body withdrawals (#27715)”; “fix(engine): classify invalid BAL input as malformed (#26844)”; “fix(engine): separate malformed input from fatal errors (#26829)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/consensus/consensus/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/rpc/rpc-engine-api/src/error.rs crates/rpc/rpc-engine-api/src/error.rs:114— crates/rpc/rpc-engine-api/src/error.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is ErrorObject::from at line 114), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine): enforce Amsterdam engine method timeframe (#28399)”; “fix(engine): report payload job start errors (#28015)”; “fix(engine): return invalid for undecodable block access lists (#26889)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/rpc/rpc-engine-api/src/error.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/engine/primitives/src/message.rs crates/engine/primitives/src/message.rs:302— crates/engine/primitives/src/message.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is BeaconEngineMessage::fmt at line 302), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine): report payload job start errors (#28015)”; “fix(tracing): preserve context across engine and worker tasks (#27529)”; “fix(engine): avoid cache handoff misses and locked drops (#27230)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/primitives/src/message.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/engine/tree/src/tree/error.rs crates/engine/tree/src/tree/error.rs:115— crates/engine/tree/src/tree/error.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is InsertBlockErrorKind::from at line 115), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine): flush state before backfill sync (#26911)”; “fix(engine): classify invalid BAL input as malformed (#26844)”; “fix(engine): separate malformed input from fatal errors (#26829)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 18:22:16 +01:00' --until='2026-11-14 18:22:16 +01:00' --full-history --no-merges -- crates/engine/tree/src/tree/error.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (9 lines × 2) crates/cli/commands/src/db/copy.rs:48— crates/cli/commands/src/db/copy.rs:48-56 | crates/cli/commands/src/db/migrate_v2.rs:414-422 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/engine/tree/src/tree/mod.rs:778— crates/engine/tree/src/tree/mod.rs:778-786 | crates/engine/tree/src/tree/mod.rs:859-867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/engine/tree/src/tree/mod.rs:858` calls `elapsed` and `crates/engine/tree/src/tree/mod.rs:777` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) crates/rpc/rpc-engine-api/src/engine_api.rs:876— crates/rpc/rpc-engine-api/src/engine_api.rs:876-884 | crates/rpc/rpc-engine-api/src/engine_api.rs:972-980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc-engine-api/src/engine_api.rs:876` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/rpc/rpc-engine-api/src/engine_api.rs:885` calls `with_capacity` and `crates/rpc/rpc-engine-api/src/engine_api.rs:981` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) crates/rpc/rpc/src/otterscan.rs:190— crates/rpc/rpc/src/otterscan.rs:190-198 | crates/rpc/rpc/src/otterscan.rs:206-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/otterscan.rs:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/rpc/rpc/src/trace.rs:611— crates/rpc/rpc/src/trace.rs:611-619 | crates/rpc/rpc/src/trace.rs:647-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/trace.rs:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/stages/stages/src/stages/utils.rs:346— crates/stages/stages/src/stages/utils.rs:346-354 | crates/stages/stages/src/stages/utils.rs:389-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/stages/stages/src/stages/utils.rs:568— crates/stages/stages/src/stages/utils.rs:568-576 | crates/stages/stages/src/stages/utils.rs:613-621 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:568` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/storage/db/src/implementation/mdbx/mod.rs:321— crates/storage/db/src/implementation/mdbx/mod.rs:321-329 | crates/storage/db/src/implementation/mdbx/mod.rs:334-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/db/src/implementation/mdbx/mod.rs:321` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/storage/nippy-jar/src/consistency.rs:67— crates/storage/nippy-jar/src/consistency.rs:67-81 | crates/storage/nippy-jar/src/consistency.rs:105-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/nippy-jar/src/consistency.rs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/storage/provider/src/providers/database/provider.rs:3379— crates/storage/provider/src/providers/database/provider.rs:3379-3388 | crates/storage/provider/src/providers/database/provider.rs:3405-3413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:3379` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/storage/storage-overlay/src/provider.rs:758— crates/storage/storage-overlay/src/provider.rs:758-766 | crates/storage/storage-overlay/src/provider.rs:776-784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/storage-overlay/src/provider.rs:758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/transaction-pool/src/blobstore/disk.rs:398— crates/transaction-pool/src/blobstore/disk.rs:398-406 | crates/transaction-pool/src/blobstore/mem.rs:229-237 — before extracting anything, compare `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/mem.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/disk.rs:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/trie/common/src/proofs.rs:241— crates/trie/common/src/proofs.rs:241-249 | crates/trie/common/src/proofs.rs:744-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/proofs.rs:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/trie/common/src/target_v2.rs:237— crates/trie/common/src/target_v2.rs:237-245 | crates/trie/common/src/target_v2.rs:269-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/target_v2.rs:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:198— crates/trie/trie/src/hashed_cursor/post_state.rs:198-206 | crates/trie/trie/src/trie_cursor/in_memory.rs:147-155 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `next_entry` to `&Option<(B256, V::NonZero)>` in one and `&Option<(Nibbles, BranchNodeCompact)>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) crates/era/src/era/file.rs:220— crates/era/src/era/file.rs:220-228 | crates/era/src/era1/file.rs:283-291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:219— crates/stages/stages/src/stages/hashing_account.rs:219-228 | crates/stages/stages/src/stages/hashing_storage.rs:154-162 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) crates/era/src/era/types/consensus.rs:99— crates/era/src/era/types/consensus.rs:99-107 | crates/era/src/era/types/consensus.rs:215-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era/src/era/types/consensus.rs:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:768— crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:768-776 | crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:1087-1095 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:768` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/storage/provider/src/test_utils/blocks.rs:299— crates/storage/provider/src/test_utils/blocks.rs:299-307 | crates/storage/provider/src/test_utils/blocks.rs:440-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/cli/commands/src/db/repair_trie.rs:170— crates/cli/commands/src/db/repair_trie.rs:170-179 | crates/cli/commands/src/db/repair_trie.rs:294-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/cli/commands/src/download/extract.rs:488— crates/cli/commands/src/download/extract.rs:488-497 | crates/cli/commands/src/download/fetch.rs:428-437 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) crates/engine/tree/src/tree/payload_processor/prewarm.rs:380— crates/engine/tree/src/tree/payload_processor/prewarm.rs:380-389 | crates/engine/tree/src/tree/payload_processor/prewarm.rs:418-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/engine/tree/src/tree/payload_processor/prewarm.rs:380` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/engine/tree/src/tree/payload_processor/prewarm.rs:428` calls `Some`, `reject` and `crates/engine/tree/src/tree/payload_processor/prewarm.rs:390` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) crates/ethereum/node/src/engine_ssz_proxy.rs:592— crates/ethereum/node/src/engine_ssz_proxy.rs:592-601 | crates/ethereum/node/src/engine_ssz_proxy.rs:636-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/net/eth-wire-types/src/broadcast.rs:744— crates/net/eth-wire-types/src/broadcast.rs:744-753 | crates/net/eth-wire-types/src/broadcast.rs:940-949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/net/network/src/session/active.rs:611— crates/net/network/src/session/active.rs:611-620 | crates/net/network/src/session/active.rs:637-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/network/src/session/active.rs:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/storage/provider/src/providers/state/latest.rs:270— crates/storage/provider/src/providers/state/latest.rs:270-279 | crates/storage/storage-overlay/src/provider.rs:845-854 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/state/latest.rs:270` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:142— crates/storage/provider/src/providers/static_file/writer.rs:142-151 | crates/storage/provider/src/providers/static_file/writer.rs:192-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/writer.rs:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/transaction-pool/src/blobstore/disk.rs:313— crates/transaction-pool/src/blobstore/disk.rs:313-322 | crates/transaction-pool/src/blobstore/mem.rs:183-192 — before extracting anything, compare `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/mem.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/disk.rs:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/trie/common/src/prefix_set.rs:282— crates/trie/common/src/prefix_set.rs:282-291 | crates/trie/common/src/prefix_set.rs:340-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/prefix_set.rs:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/trie/db/src/state.rs:231— crates/trie/db/src/state.rs:231-240 | crates/trie/db/src/state.rs:249-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/2.rs:11— docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/2.rs:11-20 | docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:37-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:53— docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:53-62 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:55-64 — before extracting anything, compare `docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs` and `docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/config/src/config.rs:296— crates/config/src/config.rs:296-305 | crates/stages/types/src/execution.rs:20-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/trie/trie/src/hashed_cursor/metrics.rs:53— crates/trie/trie/src/hashed_cursor/metrics.rs:53-62 | crates/trie/trie/src/trie_cursor/metrics.rs:53-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:297— crates/prune/prune/src/segments/user/account_history.rs:297-306 | crates/prune/prune/src/segments/user/storage_history.rs:301-310 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) crates/cli/commands/src/download/fetch.rs:259— crates/cli/commands/src/download/fetch.rs:259-268 | crates/cli/commands/src/download/fetch.rs:343-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/download/fetch.rs:259` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×16
Edited copy of a member (13 corresponding lines) crates/storage/storage-overlay/src/provider.rs:995— crates/storage/storage-overlay/src/provider.rs:995-1007 | crates/storage/storage-overlay/src/provider.rs:1012-1026 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/storage-overlay/src/provider.rs:757— crates/storage/storage-overlay/src/provider.rs:757-769 | crates/storage/storage-overlay/src/provider.rs:775-787 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/libmdbx-rs/src/transaction.rs:404— crates/storage/libmdbx-rs/src/transaction.rs:404-416 | crates/storage/libmdbx-rs/src/transaction.rs:436-448 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/provider/src/init.rs:103— crates/storage/provider/src/init.rs:103-115 | crates/storage/provider/src/init.rs:129-145 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/net/discv5/src/config.rs:417— crates/net/discv5/src/config.rs:417-429 | crates/net/discv5/src/config.rs:432-444 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/rpc/rpc-builder/src/lib.rs:1834— crates/rpc/rpc-builder/src/lib.rs:1834-1847 | crates/rpc/rpc-builder/src/lib.rs:2165-2177 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/rpc/rpc-builder/src/lib.rs:1289— crates/rpc/rpc-builder/src/lib.rs:1289-1301 | crates/rpc/rpc-builder/src/lib.rs:1318-1332 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/node/builder/src/node.rs:134— crates/node/builder/src/node.rs:134-146 | crates/rpc/rpc-builder/src/lib.rs:1060-1074 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/transaction-pool/src/blobstore/mem.rs:106— crates/transaction-pool/src/blobstore/mem.rs:106-119 | crates/transaction-pool/src/blobstore/mem.rs:129-141 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/tasks/src/lib.rs:177— crates/tasks/src/lib.rs:177-189 | crates/tasks/src/runtime.rs:934-946 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/rpc/ipc/src/server/mod.rs:100— crates/rpc/ipc/src/server/mod.rs:100-115 | crates/rpc/jsonrpsee/server/src/server.rs:142-154 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:1340— crates/storage/provider/src/providers/database/provider.rs:1340-1352 | crates/storage/provider/src/providers/database/provider.rs:1364-1377 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:2166— crates/storage/provider/src/providers/database/provider.rs:2166-2178 | crates/storage/provider/src/providers/database/provider.rs:2286-2304 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/net/downloaders/src/bodies/task.rs:40— crates/net/downloaders/src/bodies/task.rs:40-53 | crates/net/downloaders/src/headers/task.rs:41-53 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/storage/provider/src/providers/state/latest.rs:154— crates/storage/provider/src/providers/state/latest.rs:154-166 | crates/storage/provider/src/providers/state/latest.rs:190-202 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/engine/execution-cache/src/lib.rs:123— crates/engine/execution-cache/src/lib.rs:123-136 | crates/storage/storage-overlay/src/manager.rs:262-274 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×16
Edited copy of a member (9 corresponding lines) crates/transaction-pool/src/pool/txpool.rs:1875— crates/transaction-pool/src/pool/txpool.rs:1875-1883 | crates/transaction-pool/src/pool/txpool.rs:1891-1899 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/engine/tree/src/tree/state_root_strategy/mod.rs:330— crates/engine/tree/src/tree/state_root_strategy/mod.rs:330-338 | crates/trie/parallel/src/state_root_task.rs:214-222 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/ethereum/node/src/snap/mod.rs:152— crates/ethereum/node/src/snap/mod.rs:152-162 | crates/storage/provider/src/providers/database/provider.rs:1507-1515 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/storage/storage-overlay/src/provider.rs:634— crates/storage/storage-overlay/src/provider.rs:634-642 | crates/storage/storage-overlay/src/provider.rs:661-671 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/ethereum/evm/src/factory.rs:476— crates/ethereum/evm/src/factory.rs:476-484 | crates/ethereum/evm/src/factory.rs:487-495 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1076— crates/storage/provider/src/providers/rocksdb/provider.rs:1076-1087 | crates/storage/provider/src/providers/rocksdb/provider.rs:2843-2851 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/net/discv4/src/lib.rs:943— crates/net/discv4/src/lib.rs:943-951 | crates/net/dns/src/lib.rs:208-216 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/net/network/src/transactions/mod.rs:2135— crates/net/network/src/transactions/mod.rs:2135-2143 | crates/net/network/src/transactions/mod.rs:2147-2157 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/exex/exex/src/context.rs:45— crates/exex/exex/src/context.rs:45-54 | crates/exex/exex/src/dyn_context.rs:41-49 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/net/network/src/manager.rs:1047— crates/net/network/src/manager.rs:1047-1060 | crates/net/network/src/manager.rs:1065-1073 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/ethereum/node/src/node.rs:100— crates/ethereum/node/src/node.rs:100-108 | crates/exex/test-utils/src/lib.rs:144-152 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:484— crates/storage/provider/src/providers/database/provider.rs:484-496 | crates/storage/provider/src/traits/rocksdb_provider.rs:56-64 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/trie/trie/src/verify/mod.rs:142— crates/trie/trie/src/verify/mod.rs:142-150 | crates/trie/trie/src/verify/pipeline.rs:105-113 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/storage/provider/src/test_utils/mock.rs:606— crates/storage/provider/src/test_utils/mock.rs:606-614 | crates/storage/provider/src/test_utils/mock.rs:976-987 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/stages/stages/src/test_utils/test_db.rs:158— crates/stages/stages/src/test_utils/test_db.rs:158-166 | crates/stages/stages/src/test_utils/test_db.rs:178-187 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/transaction-pool/src/test_utils/mock.rs:503— crates/transaction-pool/src/test_utils/mock.rs:503-514 | crates/transaction-pool/src/test_utils/mock.rs:902-910 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (11 lines × 2) crates/net/discv4/src/lib.rs:1635— crates/net/discv4/src/lib.rs:1635-1645 | crates/net/discv4/src/lib.rs:1647-1657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) crates/net/ecies/src/codec.rs:70— crates/net/ecies/src/codec.rs:70-80 | crates/net/ecies/src/codec.rs:89-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) crates/net/network/src/error.rs:251— crates/net/network/src/error.rs:251-261 | crates/net/network/src/error.rs:272-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/rpc/rpc-engine-api/src/engine_api.rs:1133— crates/rpc/rpc-engine-api/src/engine_api.rs:1133-1143 | crates/rpc/rpc-engine-api/src/engine_api.rs:1177-1187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc-engine-api/src/engine_api.rs:1133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/rpc/rpc-engine-api/src/engine_api.rs:1396— crates/rpc/rpc-engine-api/src/engine_api.rs:1396-1406 | crates/rpc/rpc-engine-api/src/engine_api.rs:1425-1435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs:203— crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs:203-213 | crates/rpc/rpc/src/eth/filter.rs:690-700 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:234— crates/stages/stages/src/stages/hashing_account.rs:234-244 | crates/stages/stages/src/stages/hashing_storage.rs:174-184 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/hashing_account.rs:234` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) crates/storage/db-common/src/init.rs:717— crates/storage/db-common/src/init.rs:717-727 | crates/storage/db-common/src/init.rs:789-799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/storage/nippy-jar/src/cursor.rs:94— crates/storage/nippy-jar/src/cursor.rs:94-104 | crates/storage/nippy-jar/src/cursor.rs:135-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/nippy-jar/src/cursor.rs:94` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:1340— crates/storage/provider/src/providers/static_file/writer.rs:1340-1350 | crates/storage/provider/src/providers/static_file/writer.rs:1403-1413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/storage/storage-overlay/src/manager.rs:920— crates/storage/storage-overlay/src/manager.rs:920-930 | crates/storage/storage-overlay/src/manager.rs:1031-1041 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/storage-overlay/src/manager.rs:920` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/storage/storage-overlay/src/manager.rs:949— crates/storage/storage-overlay/src/manager.rs:949-959 | crates/storage/storage-overlay/src/manager.rs:1053-1063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/storage-overlay/src/manager.rs:949` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:310— crates/trie/trie/src/hashed_cursor/post_state.rs:310-322 | crates/trie/trie/src/trie_cursor/in_memory.rs:297-307 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/hashed_cursor/post_state.rs:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `B256` in one and `Nibbles` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) crates/net/network/src/peers.rs:994— crates/net/network/src/peers.rs:994-1004 | crates/net/network/src/peers.rs:1143-1153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn add_trusted_peer_node(&mut` in one and `crate) fn unban_peer_by_admin(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:68— crates/prune/prune/src/segments/user/account_history.rs:68-78 | crates/prune/prune/src/segments/user/storage_history.rs:69-79 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/user/account_history.rs:68` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:106— crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:106-116 | crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:134-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:106` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) crates/rpc/rpc-eth-api/src/helpers/transaction.rs:571— crates/rpc/rpc-eth-api/src/helpers/transaction.rs:571-576 | crates/rpc/rpc-eth-api/src/helpers/transaction.rs:651-656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/stages/stages/src/stages/index_account_history.rs:150— crates/stages/stages/src/stages/index_account_history.rs:150-155 | crates/stages/stages/src/stages/index_storage_history.rs:154-159 — before extracting anything, compare `crates/stages/stages/src/stages/index_account_history.rs` and `crates/stages/stages/src/stages/index_storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/index_account_history.rs:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/storage/provider/src/either_writer.rs:490— crates/storage/provider/src/either_writer.rs:490-495 | crates/storage/provider/src/either_writer.rs:530-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) crates/cli/commands/src/db/prune_checkpoints.rs:20— crates/cli/commands/src/db/prune_checkpoints.rs:20-25 | crates/cli/commands/src/db/stage_checkpoints.rs:22-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/cli/commands/src/db/prune_checkpoints.rs:112— crates/cli/commands/src/db/prune_checkpoints.rs:112-117 | crates/cli/commands/src/db/stage_checkpoints.rs:30-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/era/src/era1/types/execution.rs:499— crates/era/src/era1/types/execution.rs:499-504 | crates/era/src/ere/types/execution.rs:601-606 — before extracting anything, compare `crates/era/src/era1/types/execution.rs` and `crates/era/src/ere/types/execution.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/storage/storage-api/src/block_hash.rs:18— crates/storage/storage-api/src/block_hash.rs:18-23 | crates/storage/storage-api/src/block_id.rs:41-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/storage-api/src/block_hash.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/transaction-pool/src/blobstore/noop.rs:53— crates/transaction-pool/src/blobstore/noop.rs:53-58 | crates/transaction-pool/src/noop.rs:370-375 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/noop.rs:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/transaction-pool/src/pool/blob.rs:81— crates/transaction-pool/src/pool/blob.rs:81-86 | crates/transaction-pool/src/pool/parked.rs:159-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/blob.rs:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:348— crates/stages/stages/src/stages/hashing_account.rs:348-353 | crates/stages/stages/src/stages/hashing_storage.rs:268-273 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/trie/common/src/hashed_state.rs:699— crates/trie/common/src/hashed_state.rs:699-704 | crates/trie/common/src/updates.rs:816-821 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/storage/db/src/mdbx.rs:39— crates/storage/db/src/mdbx.rs:39-44 | crates/storage/db/src/mdbx.rs:57-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/db/src/mdbx.rs:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) .github/scripts/bench-reth-charts.py:62— .github/scripts/bench-reth-charts.py:62-67 | .github/scripts/bench-reth-charts.py:70-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) .github/scripts/bench-reth-charts.py:81— .github/scripts/bench-reth-charts.py:81-86 | .github/scripts/bench-reth-charts.py:88-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/storage/provider/src/test_utils/blocks.rs:223— crates/storage/provider/src/test_utils/blocks.rs:223-228 | crates/storage/provider/src/test_utils/blocks.rs:279-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×13
Edited copy of a member (10 corresponding lines) crates/rpc/rpc-eth-types/src/cache/mod.rs:222— crates/rpc/rpc-eth-types/src/cache/mod.rs:222-231 | crates/rpc/rpc-eth-types/src/cache/mod.rs:237-247 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/transaction-pool/src/pool/mod.rs:395— crates/transaction-pool/src/pool/mod.rs:395-404 | crates/transaction-pool/src/pool/mod.rs:473-484 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:503— crates/storage/provider/src/providers/static_file/manager.rs:503-512 | crates/storage/provider/src/providers/static_file/manager.rs:538-556 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1008— crates/storage/provider/src/providers/rocksdb/provider.rs:1008-1018 | crates/storage/provider/src/providers/rocksdb/provider.rs:1060-1069 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/provider/src/providers/state/latest.rs:73— crates/storage/provider/src/providers/state/latest.rs:73-82 | crates/storage/storage-overlay/src/provider.rs:536-549 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/tasks/src/lib.rs:73— crates/tasks/src/lib.rs:73-82 | crates/tasks/src/lib.rs:96-105 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/net/network/src/peers.rs:267— crates/net/network/src/peers.rs:267-276 | crates/net/network/src/peers.rs:299-311 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/engine/tree/src/tree/invalid_headers.rs:63— crates/engine/tree/src/tree/invalid_headers.rs:63-72 | crates/engine/tree/src/tree/invalid_headers.rs:75-84 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/stages/stages/src/stages/hashing_account.rs:316— crates/stages/stages/src/stages/hashing_account.rs:316-325 | crates/stages/stages/src/stages/hashing_storage.rs:257-266 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/era/src/era1/types/execution.rs:511— crates/era/src/era1/types/execution.rs:511-520 | crates/era/src/ere/types/execution.rs:613-624 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/db-api/src/models/accounts.rs:53— crates/storage/db-api/src/models/accounts.rs:53-62 | crates/storage/db-api/src/models/accounts.rs:122-131 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/storage-api/src/database_provider.rs:119— crates/storage/storage-api/src/database_provider.rs:119-128 | crates/storage/storage-api/src/database_provider.rs:138-147 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/storage/provider/src/either_writer.rs:694— crates/storage/provider/src/either_writer.rs:694-703 | crates/storage/provider/src/either_writer.rs:775-784 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) crates/chain-state/src/in_memory/canonical.rs:276— crates/chain-state/src/in_memory/canonical.rs:276-288 | crates/chain-state/src/in_memory/canonical.rs:355-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/chain-state/src/in_memory/canonical.rs:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:262— crates/prune/prune/src/segments/user/account_history.rs:262-274 | crates/prune/prune/src/segments/user/storage_history.rs:263-275 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:162— crates/stages/stages/src/stages/hashing_account.rs:162-174 | crates/stages/stages/src/stages/hashing_storage.rs:92-104 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/stages/stages/src/stages/hashing_storage.rs:91` calls `tx_ref` and `crates/stages/stages/src/stages/hashing_account.rs:161` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:652— crates/storage/provider/src/providers/static_file/writer.rs:652-664 | crates/storage/provider/src/providers/static_file/writer.rs:709-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/writer.rs:652` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/transaction-pool/src/blobstore/disk.rs:437— crates/transaction-pool/src/blobstore/disk.rs:437-449 | crates/transaction-pool/src/blobstore/mem.rs:249-261 — before extracting anything, compare `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/mem.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) crates/transaction-pool/src/pool/mod.rs:895— crates/transaction-pool/src/pool/mod.rs:895-907 | crates/transaction-pool/src/pool/mod.rs:960-972 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/mod.rs:895` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) crates/transaction-pool/src/pool/pending.rs:200— crates/transaction-pool/src/pool/pending.rs:200-212 | crates/transaction-pool/src/pool/pending.rs:253-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/pending.rs:200` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn update_blob_fee( &mut` in one and `crate) fn update_base_fee( &mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/transaction-pool/src/pool/pending.rs:251` calls `priority` and `crates/transaction-pool/src/pool/pending.rs:199` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) crates/trie/common/src/hashed_state.rs:636— crates/trie/common/src/hashed_state.rs:636-648 | crates/trie/common/src/updates.rs:725-737 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/trie/common/src/proofs.rs:213— crates/trie/common/src/proofs.rs:213-225 | crates/trie/common/src/proofs.rs:339-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) crates/trie/common/src/proofs.rs:233— crates/trie/common/src/proofs.rs:233-245 | crates/trie/common/src/proofs.rs:359-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/proofs.rs:233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/trie/common/src/proofs.rs:736— crates/trie/common/src/proofs.rs:736-748 | crates/trie/common/src/proofs.rs:786-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/proofs.rs:736` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:213— crates/trie/trie/src/hashed_cursor/post_state.rs:213-225 | crates/trie/trie/src/trie_cursor/in_memory.rs:162-174 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `B256` in one and `Nibbles` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:317— crates/prune/prune/src/segments/user/account_history.rs:317-329 | crates/prune/prune/src/segments/user/storage_history.rs:323-336 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/user/account_history.rs:317` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) crates/cli/commands/src/db/repair_trie.rs:146— crates/cli/commands/src/db/repair_trie.rs:146-157 | crates/cli/commands/src/db/repair_trie.rs:275-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/db/repair_trie.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/era/src/era1/types/execution.rs:382— crates/era/src/era1/types/execution.rs:382-393 | crates/era/src/ere/types/execution.rs:450-461 — before extracting anything, compare `crates/era/src/era1/types/execution.rs` and `crates/era/src/ere/types/execution.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era/src/era1/types/execution.rs:382` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/net/eth-wire-types/src/broadcast.rs:701— crates/net/eth-wire-types/src/broadcast.rs:701-712 | crates/net/eth-wire-types/src/broadcast.rs:717-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/rpc/rpc-eth-api/src/helpers/state.rs:176— crates/rpc/rpc-eth-api/src/helpers/state.rs:176-187 | crates/rpc/rpc-eth-api/src/helpers/state.rs:226-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc-eth-api/src/helpers/state.rs:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/rpc/rpc/src/debug.rs:1055— crates/rpc/rpc/src/debug.rs:1055-1066 | crates/rpc/rpc/src/debug.rs:1067-1078 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/stages/stages/src/stages/utils.rs:376— crates/stages/stages/src/stages/utils.rs:376-387 | crates/stages/stages/src/stages/utils.rs:600-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/storage/provider/src/providers/consistent.rs:1306— crates/storage/provider/src/providers/consistent.rs:1306-1317 | crates/storage/provider/src/providers/consistent.rs:1350-1362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/consistent.rs:1306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2263— crates/storage/provider/src/providers/rocksdb/provider.rs:2263-2274 | crates/storage/provider/src/providers/rocksdb/provider.rs:2716-2727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/transaction-pool/src/pool/pending.rs:188— crates/transaction-pool/src/pool/pending.rs:188-199 | crates/transaction-pool/src/pool/pending.rs:238-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/pending.rs:188` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/transaction-pool/src/pool/pending.rs:251` calls `priority` and `crates/transaction-pool/src/pool/pending.rs:200` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) crates/transaction-pool/src/pool/txpool.rs:443— crates/transaction-pool/src/pool/txpool.rs:443-454 | crates/transaction-pool/src/pool/txpool.rs:467-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/txpool.rs:443` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/trie/trie/src/proof/mod.rs:181— crates/trie/trie/src/proof/mod.rs:181-192 | crates/trie/trie/src/proof/mod.rs:325-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:161— crates/trie/trie/src/hashed_cursor/post_state.rs:161-172 | crates/trie/trie/src/trie_cursor/in_memory.rs:116-127 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/hashed_cursor/post_state.rs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2393— crates/storage/provider/src/providers/rocksdb/provider.rs:2393-2404 | crates/storage/provider/src/providers/rocksdb/provider.rs:2547-2558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
reth_cli_commands::db::get::get_rocksdb_storage_history (cognitive 29) crates/cli/commands/src/db/get.rs:424— reth_cli_commands::db::get::get_rocksdb_storage_history has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
reth_cli_commands::download::manifest::generate_manifest (cognitive 28) crates/cli/commands/src/download/manifest.rs:710— reth_cli_commands::download::manifest::generate_manifest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::db::get::get_rocksdb_account_history (cognitive 27) crates/cli/commands/src/db/get.rs:355— reth_cli_commands::db::get::get_rocksdb_account_history has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
reth_cli_commands::download::extract::streaming_download_and_extract (cognitive 26) crates/cli/commands/src/download/extract.rs:379— reth_cli_commands::download::extract::streaming_download_and_extract has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::import_core::import_blocks_from_file (cognitive 23) crates/cli/commands/src/import_core.rs:84— reth_cli_commands::import_core::import_blocks_from_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
reth_cli_commands::db::repair_trie::do_verify_and_repair (cognitive 21) crates/cli/commands/src/db/repair_trie.rs:261— reth_cli_commands::db::repair_trie::do_verify_and_repair has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::re_execute::verify_bundle_against_changesets (cognitive 20) crates/cli/commands/src/re_execute.rs:404— reth_cli_commands::re_execute::verify_bundle_against_changesets has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (8 pts), match/switch 2 (7 pts), if/else 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::db::checksum::checksum_change_based_segment (cognitive 18) crates/cli/commands/src/db/checksum/mod.rs:382— reth_cli_commands::db::checksum::checksum_change_based_segment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::db::tui::handle_event (cognitive 18) crates/cli/commands/src/db/tui.rs:198— reth_cli_commands::db::tui::handle_event has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 4 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::db::checksum::checksum_static_file (cognitive 17) crates/cli/commands/src/db/checksum/mod.rs:118— reth_cli_commands::db::checksum::checksum_static_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::init_state::without_evm::append_dummy_chain (cognitive 17) crates/cli/commands/src/init_state/without_evm.rs:113— reth_cli_commands::init_state::without_evm::append_dummy_chain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 6 (7 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_cli_commands::download::planning::collect_planned_archives (cognitive 16) crates/cli/commands/src/download/planning.rs:213— reth_cli_commands::download::planning::collect_planned_archives has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: RpcServerArgs crates/node/core/src/args/rpc_server.rs:449— TooManyFields — 50 stored fields beside 17 methods. The bar is 30 stored fields; this is 20 over it, 1.67× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DefaultRpcServerArgs crates/node/core/src/args/rpc_server.rs:55— TooManyFields — 46 stored fields beside 48 methods. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DatabaseProviderMetrics crates/storage/provider/src/providers/database/metrics.rs:51— TooManyFields — 38 stored fields beside 3 methods. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: JitMetrics crates/ethereum/evm/src/factory.rs:521— TooManyFields — 36 stored fields beside 2 methods. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: TreeConfig crates/engine/primitives/src/config.rs:117— TooManyFields — 35 stored fields beside 73 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: NetworkArgs crates/node/core/src/args/network.rs:239— TooManyFields — 35 stored fields beside 16 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: EngineArgs crates/node/core/src/args/engine.rs:310— TooManyFields — 35 stored fields beside 5 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DefaultEngineValues crates/node/core/src/args/engine.rs:28— TooManyFields — 31 stored fields beside 33 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DefaultTxPoolValues crates/node/core/src/args/txpool.rs:30— TooManyFields — 31 stored fields beside 33 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: SparseTrieCacheTask crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:119— TooManyFields — 31 stored fields beside 30 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: TxPoolArgs crates/node/core/src/args/txpool.rs:303— TooManyFields — 31 stored fields beside 2 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ExecutionTimingStats crates/chain-state/src/execution_stats.rs:17— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×12
Edited copy of a member (14 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1037— crates/storage/provider/src/providers/rocksdb/provider.rs:1037-1054 | crates/storage/provider/src/providers/rocksdb/provider.rs:2827-2840 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/node/builder/src/builder/mod.rs:273— crates/node/builder/src/builder/mod.rs:273-286 | crates/node/builder/src/builder/mod.rs:297-313 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/rpc/rpc/src/eth/helpers/signer.rs:28— crates/rpc/rpc/src/eth/helpers/signer.rs:28-41 | crates/rpc/rpc/src/eth/helpers/signer.rs:48-68 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/storage/storage-overlay/src/provider.rs:689— crates/storage/storage-overlay/src/provider.rs:689-702 | crates/storage/storage-overlay/src/provider.rs:720-738 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/exex/exex/src/notifications.rs:170— crates/exex/exex/src/notifications.rs:170-183 | crates/exex/exex/src/notifications.rs:185-203 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/storage/storage-overlay/src/builder.rs:676— crates/storage/storage-overlay/src/builder.rs:676-689 | crates/storage/storage-overlay/src/builder.rs:695-710 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:1628— crates/storage/provider/src/providers/database/provider.rs:1628-1643 | crates/storage/provider/src/providers/database/provider.rs:1665-1678 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/trie/db/src/state.rs:230— crates/trie/db/src/state.rs:230-243 | crates/trie/db/src/state.rs:248-261 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:171— crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:171-184 | crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:248-266 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:228— crates/trie/trie/src/hashed_cursor/post_state.rs:228-241 | crates/trie/trie/src/trie_cursor/in_memory.rs:177-192 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/rpc/rpc/src/otterscan.rs:139— crates/rpc/rpc/src/otterscan.rs:139-153 | crates/rpc/rpc/src/otterscan.rs:168-181 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/transaction-pool/src/test_utils/mock.rs:526— crates/transaction-pool/src/test_utils/mock.rs:526-539 | crates/transaction-pool/src/test_utils/mock.rs:542-555 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (5 lines × 2) crates/era-utils/src/history.rs:652— crates/era-utils/src/history.rs:652-656 | crates/storage/provider/src/providers/static_file/manager.rs:2074-2078 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era-utils/src/history.rs:652` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) crates/stages/stages/src/stages/utils.rs:262— crates/stages/stages/src/stages/utils.rs:262-266 | crates/stages/stages/src/stages/utils.rs:470-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2458— crates/storage/provider/src/providers/rocksdb/provider.rs:2458-2462 | crates/storage/provider/src/providers/rocksdb/provider.rs:2612-2616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) crates/era/src/era1/types/execution.rs:285— crates/era/src/era1/types/execution.rs:285-289 | crates/era/src/ere/types/execution.rs:210-214 — before extracting anything, compare `crates/era/src/era1/types/execution.rs` and `crates/era/src/ere/types/execution.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) crates/net/p2p/src/bodies/client.rs:80— crates/net/p2p/src/bodies/client.rs:80-84 | crates/net/p2p/src/headers/client.rs:111-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:19— docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:19-23 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs:24-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:19` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/net/discv4/src/lib.rs:835— crates/net/discv4/src/lib.rs:835-839 | crates/net/dns/src/lib.rs:199-203 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/era/src/era/file.rs:158— crates/era/src/era/file.rs:158-162 | crates/era/src/era1/file.rs:206-210 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era/src/era/file.rs:158` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) crates/cli/commands/src/db/stats.rs:130— crates/cli/commands/src/db/stats.rs:130-134 | crates/cli/commands/src/db/stats.rs:210-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/era-downloader/src/client.rs:136— crates/era-downloader/src/client.rs:136-140 | crates/era-downloader/src/client.rs:155-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era-downloader/src/client.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/rpc/rpc/src/debug.rs:193— crates/rpc/rpc/src/debug.rs:193-197 | crates/rpc/rpc/src/debug.rs:863-867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/debug.rs:193` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) .github/scripts/bench-call-summary.py:367— .github/scripts/bench-call-summary.py:367-371 | .github/scripts/bench-reth-summary.py:972-982 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Low cohesion: PeersConfig (LCOM4 14) crates/net/network-types/src/peers/config.rs:128— PeersConfig's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DefaultTraceValues (LCOM4 10) crates/node/core/src/args/trace.rs:18— DefaultTraceValues's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: RayonConfig (LCOM4 9) crates/tasks/src/runtime.rs:101— RayonConfig's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: StreamBackfillJob (LCOM4 5) crates/exex/exex/src/backfill/stream.rs:54— StreamBackfillJob's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: RpcBlockchainProvider (LCOM4 5) crates/storage/rpc-provider/src/lib.rs:133— RpcBlockchainProvider's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: EthEvmConfig (LCOM4 4) crates/ethereum/evm/src/lib.rs:262— EthEvmConfig's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: RlpxSatelliteStream (LCOM4 4) crates/net/eth-wire/src/multiplex.rs:666— RlpxSatelliteStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: P2PStream (LCOM4 4) crates/net/eth-wire/src/p2pstream.rs:290— P2PStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ValidationApi (LCOM4 4) crates/rpc/rpc/src/validation.rs:56— ValidationApi's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: EthStateCacheService (LCOM4 4) crates/rpc/rpc-eth-types/src/cache/mod.rs:322— EthStateCacheService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TestStage (LCOM4 4) crates/stages/api/src/test_utils.rs:16— TestStage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Zstd (LCOM4 4) crates/storage/nippy-jar/src/compression/zstd.rs:28— Zstd's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AXH1 · Runtime security headers· Runtime security header not set · ×11
Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-embedder-policy — The live app's responses did not include cross-origin-embedder-policy (recommended by the OWASP Secure Headers Project (value: require-corp)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-opener-policy — The live app's responses did not include cross-origin-opener-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-resource-policy — The live app's responses did not include cross-origin-resource-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-content-type-options — The live app's responses did not include x-content-type-options (stops MIME-sniffing (expects 'nosniff')). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-dns-prefetch-control — The live app's responses did not include x-dns-prefetch-control (recommended by the OWASP Secure Headers Project (value: off)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-permitted-cross-domain-policies — The live app's responses did not include x-permitted-cross-domain-policies (recommended by the OWASP Secure Headers Project (value: none)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×11
Edited copy of a member (16 corresponding lines) crates/storage/db/src/mdbx.rs:33— crates/storage/db/src/mdbx.rs:33-50 | crates/storage/db/src/mdbx.rs:54-69 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/cli/commands/src/db/tui.rs:136— crates/cli/commands/src/db/tui.rs:136-162 | crates/cli/commands/src/download/tui.rs:343-358 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1768— crates/storage/provider/src/providers/rocksdb/provider.rs:1768-1783 | crates/storage/provider/src/providers/rocksdb/provider.rs:1796-1814 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/rpc/rpc-layer/src/compression_layer.rs:41— crates/rpc/rpc-layer/src/compression_layer.rs:41-56 | crates/rpc/rpc-layer/src/decompression_layer.rs:44-64 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/storage/provider/src/providers/static_file/jar.rs:104— crates/storage/provider/src/providers/static_file/jar.rs:104-119 | crates/storage/provider/src/providers/static_file/jar.rs:126-143 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/trie/common/src/updates.rs:329— crates/trie/common/src/updates.rs:329-344 | crates/trie/common/src/updates.rs:348-365 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/net/eth-wire-types/src/broadcast.rs:700— crates/net/eth-wire-types/src/broadcast.rs:700-715 | crates/net/eth-wire-types/src/broadcast.rs:716-731 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/stages/stages/src/stages/sender_recovery.rs:433— crates/stages/stages/src/stages/sender_recovery.rs:433-448 | crates/stages/stages/src/stages/tx_lookup.rs:255-273 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:2014— crates/storage/provider/src/providers/database/provider.rs:2014-2029 | crates/storage/provider/src/providers/database/provider.rs:2035-2050 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/stages/stages/src/test_utils/test_db.rs:46— crates/stages/stages/src/test_utils/test_db.rs:46-61 | crates/stages/stages/src/test_utils/test_db.rs:65-81 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/e2e-test-utils/src/testsuite/actions/mod.rs:216— crates/e2e-test-utils/src/testsuite/actions/mod.rs:216-231 | crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:151-167 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×11
Edited copy of a member (15 corresponding lines) crates/ethereum/evm/src/convert.rs:74— crates/ethereum/evm/src/convert.rs:74-88 | crates/ethereum/evm/src/convert.rs:96-116 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:563— crates/storage/provider/src/providers/static_file/manager.rs:563-577 | crates/storage/provider/src/providers/static_file/manager.rs:584-606 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/storage/provider/src/providers/consistent.rs:91— crates/storage/provider/src/providers/consistent.rs:91-105 | crates/storage/provider/src/providers/static_file/manager.rs:2070-2085 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/cli/commands/src/download/manifest.rs:462— crates/cli/commands/src/download/manifest.rs:462-476 | crates/cli/commands/src/download/manifest.rs:484-502 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/snap-sync/src/bootstrap.rs:462— crates/snap-sync/src/bootstrap.rs:462-479 | crates/snap-sync/src/bootstrap.rs:485-499 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/storage/storage-overlay/src/provider.rs:193— crates/storage/storage-overlay/src/provider.rs:193-207 | crates/storage/storage-overlay/src/provider.rs:237-251 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/prune/prune/src/builder.rs:101— crates/prune/prune/src/builder.rs:101-117 | crates/prune/prune/src/builder.rs:137-151 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/era/src/ere/types/execution.rs:410— crates/era/src/ere/types/execution.rs:410-424 | crates/era/src/ere/types/execution.rs:447-461 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/storage/provider/src/providers/consistent.rs:739— crates/storage/provider/src/providers/consistent.rs:739-753 | crates/storage/provider/src/providers/consistent.rs:758-772 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/rpc/rpc-builder/src/lib.rs:2218— crates/rpc/rpc-builder/src/lib.rs:2218-2232 | crates/rpc/rpc-layer/src/auth_client_layer.rs:74-88 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/trie/trie/src/test_utils.rs:230— crates/trie/trie/src/test_utils.rs:230-244 | crates/trie/trie/src/test_utils.rs:250-267 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×11
Edited copy of a member (8 corresponding lines) crates/trie/common/src/hashed_state.rs:518— crates/trie/common/src/hashed_state.rs:518-525 | crates/trie/common/src/updates.rs:599-606 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1141— crates/storage/provider/src/providers/rocksdb/provider.rs:1141-1148 | crates/storage/provider/src/providers/rocksdb/provider.rs:2863-2870 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/storage/db/src/static_file/cursor.rs:74— crates/storage/db/src/static_file/cursor.rs:74-81 | crates/storage/db/src/static_file/cursor.rs:87-98 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:2908— crates/storage/provider/src/providers/static_file/manager.rs:2908-2921 | crates/storage/provider/src/providers/static_file/manager.rs:2950-2957 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) .github/scripts/bench-reth-summary.py:143— .github/scripts/bench-reth-summary.py:143-153 | .github/scripts/bench-target-metric-sample-filter.py:17-24 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/transaction-pool/src/blobstore/disk.rs:369— crates/transaction-pool/src/blobstore/disk.rs:369-378 | crates/transaction-pool/src/blobstore/mem.rs:202-209 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/cli/commands/src/download/fetch.rs:505— crates/cli/commands/src/download/fetch.rs:505-512 | crates/cli/commands/src/download/progress.rs:630-641 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/payload/basic/src/lib.rs:899— crates/payload/basic/src/lib.rs:899-908 | crates/payload/basic/src/lib.rs:932-939 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/cli/commands/src/download/manifest.rs:606— crates/cli/commands/src/download/manifest.rs:606-613 | crates/cli/commands/src/download/manifest.rs:616-625 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/net/p2p/src/test_utils/bodies.rs:51— crates/net/p2p/src/test_utils/bodies.rs:51-58 | crates/net/p2p/src/test_utils/receipts.rs:41-48 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/trie/trie/src/test_utils.rs:14— crates/trie/trie/src/test_utils.rs:14-21 | crates/trie/trie/src/test_utils.rs:35-43 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) crates/cli/commands/src/download/tui.rs:229— crates/cli/commands/src/download/tui.rs:229-235 | crates/cli/commands/src/download/tui.rs:242-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/download/tui.rs:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/net/eth-wire-types/src/broadcast.rs:736— crates/net/eth-wire-types/src/broadcast.rs:736-742 | crates/net/eth-wire-types/src/broadcast.rs:920-926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/stages/stages/src/stages/utils.rs:254— crates/stages/stages/src/stages/utils.rs:254-260 | crates/stages/stages/src/stages/utils.rs:462-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:254` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/storage/provider/src/providers/database/provider.rs:2167— crates/storage/provider/src/providers/database/provider.rs:2167-2173 | crates/storage/provider/src/providers/database/provider.rs:2287-2293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:2167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:1279— crates/storage/provider/src/providers/rocksdb/provider.rs:1279-1285 | crates/storage/provider/src/providers/rocksdb/provider.rs:1329-1335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:1279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/transaction-pool/src/traits.rs:201— crates/transaction-pool/src/traits.rs:201-207 | crates/transaction-pool/src/traits.rs:219-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/traits.rs:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/trie/common/src/hashed_state.rs:519— crates/trie/common/src/hashed_state.rs:519-525 | crates/trie/common/src/updates.rs:600-606 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) crates/era-utils/src/export/era1.rs:85— crates/era-utils/src/export/era1.rs:85-91 | crates/era-utils/src/export/ere.rs:110-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) crates/trie/trie/src/hashed_cursor/metrics.rs:94— crates/trie/trie/src/hashed_cursor/metrics.rs:94-100 | crates/trie/trie/src/trie_cursor/metrics.rs:104-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/trie_cursor/metrics.rs:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `B256` in one and `Nibbles` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) crates/trie/trie/src/hashed_cursor/metrics.rs:102— crates/trie/trie/src/hashed_cursor/metrics.rs:102-108 | crates/trie/trie/src/trie_cursor/metrics.rs:112-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/trie/trie/src/trie_cursor/metrics.rs:120` calls `current` and `crates/trie/trie/src/hashed_cursor/metrics.rs:110` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) crates/net/p2p/src/test_utils/bodies.rs:52— crates/net/p2p/src/test_utils/bodies.rs:52-58 | crates/net/p2p/src/test_utils/receipts.rs:42-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×10
Edited copy of a member (7 corresponding lines) .github/scripts/bench-call-summary.py:215— .github/scripts/bench-call-summary.py:215-221 | .github/scripts/bench-call-summary.py:225-234 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/storage/db-api/src/mock.rs:257— crates/storage/db-api/src/mock.rs:257-264 | crates/storage/db-api/src/mock.rs:295-301 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/stages/api/src/pipeline/builder.rs:110— crates/stages/api/src/pipeline/builder.rs:110-116 | crates/stages/api/src/pipeline/mod.rs:761-768 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/storage/storage-overlay/src/provider.rs:626— crates/storage/storage-overlay/src/provider.rs:626-632 | crates/storage/storage-overlay/src/provider.rs:647-656 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/evm/evm/src/cached.rs:108— crates/evm/evm/src/cached.rs:108-116 | crates/evm/evm/src/cached.rs:118-124 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/storage/provider/src/providers/static_file/jar.rs:248— crates/storage/provider/src/providers/static_file/jar.rs:248-254 | crates/storage/provider/src/providers/static_file/jar.rs:262-268 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/evm/execution-types/src/chain.rs:513— crates/evm/execution-types/src/chain.rs:513-519 | crates/evm/execution-types/src/chain.rs:523-529 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/engine/execution-cache/src/txpool.rs:49— crates/engine/execution-cache/src/txpool.rs:49-55 | crates/engine/tree/src/tree/txpool_prewarm/worker.rs:343-349 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/transaction-pool/src/test_utils/mock.rs:950— crates/transaction-pool/src/test_utils/mock.rs:950-956 | crates/transaction-pool/src/traits.rs:1868-1874 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/net/p2p/src/test_utils/full_block.rs:161— crates/net/p2p/src/test_utils/full_block.rs:161-175 | crates/net/p2p/src/test_utils/full_block.rs:190-196 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Command::execute (cognitive 102) crates/cli/commands/src/re_execute.rs:78— Command::execute has cognitive complexity 102 (threshold 15). Drivers by points: if/else 24 (80 pts), loops 5 (12 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Command::execute (cognitive 29) crates/cli/commands/src/db/get.rs:133— Command::execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 4 (6 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Command::execute (cognitive 26) crates/cli/commands/src/p2p/bootnode.rs:64— Command::execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (11 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::static_files_stats_table (cognitive 25) crates/cli/commands/src/db/stats.rs:223— Command::static_files_stats_table has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::execute_current (cognitive 24) crates/cli/commands/src/db/state.rs:59— Command::execute_current has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::execute (cognitive 23) crates/cli/commands/src/db/account_storage.rs:24— Command::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::execute (cognitive 20) crates/cli/commands/src/stage/drop.rs:40— Command::execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::execute (cognitive 20) crates/cli/commands/src/stage/run.rs:110— Command::execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command::execute (cognitive 17) crates/cli/commands/src/db/mod.rs:88— Command::execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×9
Edited copy of a member (27 corresponding lines) crates/era/src/era/file.rs:154— crates/era/src/era/file.rs:154-192 | crates/era/src/ere/file.rs:182-208 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/storage/provider/src/changeset_walker.rs:67— crates/storage/provider/src/changeset_walker.rs:67-100 | crates/storage/provider/src/changeset_walker.rs:149-175 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:2465— crates/storage/provider/src/providers/static_file/manager.rs:2465-2491 | crates/storage/provider/src/providers/static_file/manager.rs:2569-2595 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/node/core/src/args/trace.rs:305— crates/node/core/src/args/trace.rs:305-334 | crates/node/core/src/args/trace.rs:342-368 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/stages/stages/src/stages/utils.rs:375— crates/stages/stages/src/stages/utils.rs:375-401 | crates/stages/stages/src/stages/utils.rs:599-625 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/storage/storage-overlay/src/provider.rs:502— crates/storage/storage-overlay/src/provider.rs:502-528 | crates/storage/storage-overlay/src/provider.rs:911-939 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:1440— crates/storage/provider/src/providers/static_file/writer.rs:1440-1467 | crates/storage/provider/src/providers/static_file/writer.rs:1504-1530 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/net/network/src/eth_requests.rs:250— crates/net/network/src/eth_requests.rs:250-276 | crates/net/network/src/eth_requests.rs:414-440 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/net/ecies/src/algorithm.rs:283— crates/net/ecies/src/algorithm.rs:283-310 | crates/net/ecies/src/algorithm.rs:326-352 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×9
Edited copy of a member (17 corresponding lines) crates/net/p2p/src/full_block.rs:650— crates/net/p2p/src/full_block.rs:650-666 | crates/net/p2p/src/full_block.rs:985-1001 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/storage/storage-overlay/src/manager.rs:70— crates/storage/storage-overlay/src/manager.rs:70-87 | crates/storage/storage-overlay/src/manager.rs:103-119 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/era-downloader/src/client.rs:133— crates/era-downloader/src/client.rs:133-149 | crates/era-downloader/src/client.rs:152-168 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/net/eth-wire-types/src/message.rs:800— crates/net/eth-wire-types/src/message.rs:800-816 | crates/net/eth-wire-types/src/message.rs:844-862 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/transaction-pool/src/blobstore/mem.rs:180— crates/transaction-pool/src/blobstore/mem.rs:180-197 | crates/transaction-pool/src/blobstore/mem.rs:226-242 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/rpc/rpc/src/validation.rs:444— crates/rpc/rpc/src/validation.rs:444-460 | crates/rpc/rpc/src/validation.rs:466-489 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/net/p2p/src/full_block.rs:449— crates/net/p2p/src/full_block.rs:449-465 | crates/net/p2p/src/full_block.rs:592-609 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:209— crates/trie/trie/src/hashed_cursor/post_state.rs:209-225 | crates/trie/trie/src/trie_cursor/in_memory.rs:158-174 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) .github/scripts/bench-reth-charts.py:35— .github/scripts/bench-reth-charts.py:35-51 | .github/scripts/bench-reth-summary.py:71-87 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×9
Edited copy of a member (11 corresponding lines) .github/scripts/bench-call-summary.py:783— .github/scripts/bench-call-summary.py:783-793 | .github/scripts/bench-reth-summary.py:1895-1905 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/trie/trie/src/trie_cursor/mock.rs:192— crates/trie/trie/src/trie_cursor/mock.rs:192-202 | crates/trie/trie/src/trie_cursor/mock.rs:208-219 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/rpc/rpc/src/otterscan.rs:187— crates/rpc/rpc/src/otterscan.rs:187-198 | crates/rpc/rpc/src/otterscan.rs:204-214 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:994— crates/storage/provider/src/providers/rocksdb/provider.rs:994-1005 | crates/storage/provider/src/providers/rocksdb/provider.rs:2804-2814 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/ethereum/evm/src/lib.rs:461— crates/ethereum/evm/src/lib.rs:461-471 | crates/ethereum/evm/src/lib.rs:558-568 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/evm/evm/src/execute.rs:1164— crates/evm/evm/src/execute.rs:1164-1174 | crates/evm/evm/src/execute.rs:1183-1197 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/rpc/rpc-engine-api/src/engine_api.rs:791— crates/rpc/rpc-engine-api/src/engine_api.rs:791-802 | crates/rpc/rpc-engine-api/src/engine_api.rs:924-934 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/ethereum/evm/src/executor.rs:476— crates/ethereum/evm/src/executor.rs:476-488 | crates/ethereum/evm/src/executor.rs:574-584 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/transaction-pool/src/pool/mod.rs:274— crates/transaction-pool/src/pool/mod.rs:274-284 | crates/transaction-pool/src/pool/mod.rs:290-300 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
DatabaseProvider::take_state_above (cognitive 57) crates/storage/provider/src/providers/database/provider.rs:3076— DatabaseProvider::take_state_above has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 6 (13 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseProvider::remove_state_above (cognitive 49) crates/storage/provider/src/providers/database/provider.rs:2938— DatabaseProvider::remove_state_above has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 4 (10 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseProvider::save_blocks_inner (cognitive 30) crates/storage/provider/src/providers/database/provider.rs:574— DatabaseProvider::save_blocks_inner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 4 (8 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DatabaseProvider::write_state_reverts (cognitive 27) crates/storage/provider/src/providers/database/provider.rs:2738— DatabaseProvider::write_state_reverts has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (11 pts) (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DatabaseProvider::write_state_changes (cognitive 25) crates/storage/provider/src/providers/database/provider.rs:2817— DatabaseProvider::write_state_changes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseProvider::get_prune_checkpoints_for_availability (cognitive 22) crates/storage/provider/src/providers/database/provider.rs:3987— DatabaseProvider::get_prune_checkpoints_for_availability has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseProvider::write_state (cognitive 19) crates/storage/provider/src/providers/database/provider.rs:2620— DatabaseProvider::write_state has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseProvider::append_blocks_with_state (cognitive 16) crates/storage/provider/src/providers/database/provider.rs:3869— DatabaseProvider::append_blocks_with_state has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×8
Edited copy of a member (20 corresponding lines) crates/config/src/config.rs:60— crates/config/src/config.rs:60-79 | crates/node/core/src/node_config.rs:549-568 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/net/network/src/transactions/mod.rs:2067— crates/net/network/src/transactions/mod.rs:2067-2086 | crates/net/network/src/transactions/mod.rs:2113-2132 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1371— crates/storage/provider/src/providers/rocksdb/provider.rs:1371-1390 | crates/storage/provider/src/providers/rocksdb/provider.rs:1402-1421 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/engine/execution-cache/src/cached_state.rs:532— crates/engine/execution-cache/src/cached_state.rs:532-551 | crates/engine/execution-cache/src/cached_state.rs:572-591 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/net/network/src/session/active.rs:610— crates/net/network/src/session/active.rs:610-629 | crates/net/network/src/session/active.rs:636-659 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/era/src/era1/types/execution.rs:332— crates/era/src/era1/types/execution.rs:332-351 | crates/era/src/era1/types/execution.rs:374-393 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:139— crates/storage/provider/src/providers/static_file/writer.rs:139-158 | crates/storage/provider/src/providers/static_file/writer.rs:189-208 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/transaction-pool/src/pool/listener.rs:287— crates/transaction-pool/src/pool/listener.rs:287-306 | crates/transaction-pool/src/pool/listener.rs:329-348 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
ArenaParallelSparseTrie::update_leaves (cognitive 63) crates/trie/sparse/src/arena/mod.rs:2776— ArenaParallelSparseTrie::update_leaves has cognitive complexity 63 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 6 (18 pts), loops 7 (16 pts), boolean chains 4 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::update_cached_rlp (cognitive 56) crates/trie/sparse/src/arena/mod.rs:1030— ArenaParallelSparseTrie::update_cached_rlp has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (39 pts), match/switch 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::prune (cognitive 41) crates/trie/sparse/src/arena/mod.rs:2642— ArenaParallelSparseTrie::prune has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::reveal_nodes (cognitive 35) crates/trie/sparse/src/arena/mod.rs:2341— ArenaParallelSparseTrie::reveal_nodes has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 4 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::maybe_collapse_or_remove_branch (cognitive 28) crates/trie/sparse/src/arena/mod.rs:847— ArenaParallelSparseTrie::maybe_collapse_or_remove_branch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::update_subtrie_hashes (cognitive 25) crates/trie/sparse/src/arena/mod.rs:2507— ArenaParallelSparseTrie::update_subtrie_hashes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaParallelSparseTrie::find_leaf_in_arena (cognitive 23) crates/trie/sparse/src/arena/mod.rs:1287— ArenaParallelSparseTrie::find_leaf_in_arena has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Outbound HTTP without resilience crates/cli/commands/src/download/manifest.rs:687— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/cli/commands/src/download/source.rs:103— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/cli/commands/src/download/source.rs:167— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/cli/commands/src/import_era.rs:184— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/consensus/debug-client/src/providers/etherscan.rs:36— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/node/metrics/src/server.rs:254— `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/stages/stages/src/stages/era.rs:91— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
EngineApiTreeHandler::on_engine_message (cognitive 56) crates/engine/tree/src/tree/mod.rs:655— EngineApiTreeHandler::on_engine_message has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (45 pts), match/switch 5 (11 pts) (nesting depth added 37). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EngineApiTreeHandler::insert_block_or_payload (cognitive 21) crates/engine/tree/src/tree/insert.rs:392— EngineApiTreeHandler::insert_block_or_payload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineApiTreeHandler::apply_chain_update (cognitive 19) crates/engine/tree/src/tree/forkchoice.rs:202— EngineApiTreeHandler::apply_chain_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineApiTreeHandler::run_until_exit (cognitive 19) crates/engine/tree/src/tree/mod.rs:491— EngineApiTreeHandler::run_until_exit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineApiTreeHandler::on_backfill_sync_finished (cognitive 18) crates/engine/tree/src/tree/sync.rs:98— EngineApiTreeHandler::on_backfill_sync_finished has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EngineApiTreeHandler::get_save_blocks_input (cognitive 16) crates/engine/tree/src/tree/persist.rs:268— EngineApiTreeHandler::get_save_blocks_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×6
Edited copy of a member (5 corresponding lines) crates/storage/provider/src/providers/blockchain_provider.rs:391— crates/storage/provider/src/providers/blockchain_provider.rs:391-400 | crates/storage/provider/src/providers/blockchain_provider.rs:406-410 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/storage/db-api/src/models/bal.rs:76— crates/storage/db-api/src/models/bal.rs:76-86 | crates/storage/db-api/src/models/accounts.rs:66-70 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/net/peers/src/node_record.rs:53— crates/net/peers/src/node_record.rs:53-57 | crates/net/peers/src/trusted_peer.rs:36-40 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/rpc/rpc-eth-types/src/block.rs:136— crates/rpc/rpc-eth-types/src/block.rs:136-140 | crates/rpc/rpc-eth-types/src/pending_block.rs:137-141 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/cli/commands/src/download/progress.rs:326— crates/cli/commands/src/download/progress.rs:326-330 | crates/transaction-pool/src/blobstore/mod.rs:279-283 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/rpc/rpc-eth-api/src/helpers/transaction.rs:917— crates/rpc/rpc-eth-api/src/helpers/transaction.rs:917-924 | crates/storage/provider/src/providers/database/provider.rs:2145-2149 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Command::execute (cyclomatic 32) crates/cli/commands/src/re_execute.rs:78— Command::execute has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Command::execute (cyclomatic 26) crates/cli/commands/src/stage/drop.rs:40— Command::execute has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Command::execute (cyclomatic 25) crates/cli/commands/src/db/mod.rs:88— Command::execute has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Command::execute (cyclomatic 22) crates/cli/commands/src/stage/run.rs:110— Command::execute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Command::execute (cyclomatic 21) crates/cli/commands/src/db/get.rs:133— Command::execute has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArenaParallelSparseTrie::update_cached_rlp (cyclomatic 30) crates/trie/sparse/src/arena/mod.rs:1030— ArenaParallelSparseTrie::update_cached_rlp has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArenaParallelSparseTrie::update_leaves (cyclomatic 30) crates/trie/sparse/src/arena/mod.rs:2776— ArenaParallelSparseTrie::update_leaves has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ArenaParallelSparseTrie::reveal_nodes (cyclomatic 19) crates/trie/sparse/src/arena/mod.rs:2341— ArenaParallelSparseTrie::reveal_nodes has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArenaParallelSparseTrie::update_subtrie_hashes (cyclomatic 18) crates/trie/sparse/src/arena/mod.rs:2507— ArenaParallelSparseTrie::update_subtrie_hashes has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArenaParallelSparseTrie::prune (cyclomatic 18) crates/trie/sparse/src/arena/mod.rs:2642— ArenaParallelSparseTrie::prune has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransactionFetcher::on_announcement (cognitive 49) crates/net/network/src/transactions/fetcher.rs:196— TransactionFetcher::on_announcement has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (41 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionFetcher::evict_pending (cognitive 22) crates/net/network/src/transactions/fetcher.rs:572— TransactionFetcher::evict_pending has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionFetcher::dispatch (cognitive 21) crates/net/network/src/transactions/fetcher.rs:358— TransactionFetcher::dispatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionFetcher::on_delivery (cognitive 20) crates/net/network/src/transactions/fetcher.rs:869— TransactionFetcher::on_delivery has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionFetcher::pack_request (cognitive 16) crates/net/network/src/transactions/fetcher.rs:701— TransactionFetcher::pack_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_rpc_eth_types::simulate::execute_transactions (cognitive 37) crates/rpc/rpc-eth-types/src/simulate.rs:317— reth_rpc_eth_types::simulate::execute_transactions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 3, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_rpc_eth_types::cache::db::apply_state_overrides_with_state (cognitive 31) crates/rpc/rpc-eth-types/src/cache/db.rs:98— reth_rpc_eth_types::cache::db::apply_state_overrides_with_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_rpc_eth_types::simulate::resolve_transaction_with_account (cognitive 23) crates/rpc/rpc-eth-types/src/simulate.rs:505— reth_rpc_eth_types::simulate::resolve_transaction_with_account has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_rpc_eth_types::logs_utils::append_matching_block_logs (cognitive 22) crates/rpc/rpc-eth-types/src/logs_utils.rs:83— reth_rpc_eth_types::logs_utils::append_matching_block_logs has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 2 (11 pts), if/else 3 (8 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
reth_rpc_eth_types::simulate::sanitize_chain (cognitive 19) crates/rpc/rpc-eth-types/src/simulate.rs:171— reth_rpc_eth_types::simulate::sanitize_chain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) crates/tasks/src/worker_map.rs:60— crates/tasks/src/worker_map.rs:60-84 | crates/tasks/src/worker_map.rs:91-116 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/tasks/src/runtime.rs:703— crates/tasks/src/runtime.rs:703-727 | crates/tasks/src/runtime.rs:772-802 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/rpc/rpc/src/validation.rs:291— crates/rpc/rpc/src/validation.rs:291-315 | crates/rpc/rpc/src/validation.rs:686-712 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/storage/provider/src/providers/state/latest.rs:255— crates/storage/provider/src/providers/state/latest.rs:255-279 | crates/storage/storage-overlay/src/provider.rs:830-854 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/storage/nippy-jar/src/compression/lz4.rs:10— crates/storage/nippy-jar/src/compression/lz4.rs:10-34 | crates/storage/nippy-jar/src/compression/lz4.rs:52-76 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×5
Edited copy of a member (23 corresponding lines) crates/net/eth-wire-types/src/broadcast.rs:610— crates/net/eth-wire-types/src/broadcast.rs:610-632 | crates/net/eth-wire-types/src/broadcast.rs:793-819 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) crates/transaction-pool/src/pool/blob.rs:110— crates/transaction-pool/src/pool/blob.rs:110-140 | crates/transaction-pool/src/pool/blob.rs:167-189 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) crates/engine/invalid-block-hooks/src/witness.rs:207— crates/engine/invalid-block-hooks/src/witness.rs:207-232 | crates/engine/invalid-block-hooks/src/witness.rs:240-262 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) crates/cli/commands/src/stage/dump/execution.rs:140— crates/cli/commands/src/stage/dump/execution.rs:140-162 | crates/cli/commands/src/stage/dump/hashing_storage.rs:49-71 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) crates/storage/db-common/src/init.rs:881— crates/storage/db-common/src/init.rs:881-903 | crates/storage/db-common/src/init.rs:908-930 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×5
Edited copies of one member (3 members, 12+ corresponding lines) crates/era/src/common/compression.rs:14— crates/era/src/common/compression.rs:14-25 | crates/era/src/era/types/consensus.rs:93-107 | crates/era/src/era/types/consensus.rs:209-223 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) crates/tasks/src/pool.rs:270— crates/tasks/src/pool.rs:270-281 | crates/tasks/src/pool.rs:287-298 | crates/tasks/src/pool.rs:323-334 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) crates/chain-state/src/notifications.rs:69— crates/chain-state/src/notifications.rs:69-80 | crates/payload/builder-primitives/src/events.rs:66-81 | crates/payload/builder-primitives/src/events.rs:96-111 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) crates/storage/provider/src/either_writer.rs:466— crates/storage/provider/src/either_writer.rs:466-477 | crates/storage/provider/src/either_writer.rs:498-509 | crates/storage/provider/src/either_writer.rs:597-608 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) crates/trie/common/src/hashed_state.rs:215— crates/trie/common/src/hashed_state.rs:215-226 | crates/trie/common/src/proofs.rs:79-90 | crates/trie/common/src/proofs.rs:633-645 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (19–20 lines × 2) crates/storage/provider/src/providers/consistent.rs:1320— crates/storage/provider/src/providers/consistent.rs:1320-1339 | crates/storage/provider/src/providers/consistent.rs:1365-1383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/consistent.rs:1320` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–20 lines × 2) crates/storage/provider/src/providers/database/provider.rs:1119— crates/storage/provider/src/providers/database/provider.rs:1119-1137 | crates/storage/provider/src/providers/database/provider.rs:1234-1253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:1119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–20 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:1292— crates/storage/provider/src/providers/rocksdb/provider.rs:1292-1311 | crates/storage/provider/src/providers/rocksdb/provider.rs:1340-1358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:1292` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) crates/storage/provider/src/providers/static_file/manager.rs:2500— crates/storage/provider/src/providers/static_file/manager.rs:2500-2519 | crates/storage/provider/src/providers/static_file/manager.rs:2605-2623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/manager.rs:2500` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–20 lines × 2) crates/tasks/src/runtime.rs:705— crates/tasks/src/runtime.rs:705-724 | crates/tasks/src/runtime.rs:775-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) crates/cli/commands/src/download/manifest.rs:324— crates/cli/commands/src/download/manifest.rs:324-339 | crates/cli/commands/src/download/manifest.rs:359-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/download/manifest.rs:324` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) crates/net/eth-wire-types/src/broadcast.rs:611— crates/net/eth-wire-types/src/broadcast.rs:611-626 | crates/net/eth-wire-types/src/broadcast.rs:794-809 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/eth-wire-types/src/broadcast.rs:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) crates/storage/provider/src/providers/consistent.rs:238— crates/storage/provider/src/providers/consistent.rs:238-253 | crates/storage/provider/src/providers/consistent.rs:335-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) crates/transaction-pool/src/blobstore/disk.rs:86— crates/transaction-pool/src/blobstore/disk.rs:86-101 | crates/transaction-pool/src/blobstore/mem.rs:31-46 — before extracting anything, compare `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/mem.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/disk.rs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) crates/trie/common/src/proofs.rs:248— crates/trie/common/src/proofs.rs:248-263 | crates/trie/common/src/proofs.rs:373-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/common/src/proofs.rs:248` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) crates/storage/provider/src/providers/static_file/writer.rs:1235— crates/storage/provider/src/providers/static_file/writer.rs:1235-1248 | crates/storage/provider/src/providers/static_file/writer.rs:1266-1279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/writer.rs:1235` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/storage/provider/src/providers/static_file/writer.rs:1233` calls `increment_block`, `number` and `crates/storage/provider/src/providers/static_file/writer.rs:1264` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:366— crates/trie/trie/src/hashed_cursor/post_state.rs:366-379 | crates/trie/trie/src/trie_cursor/in_memory.rs:345-358 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/hashed_cursor/post_state.rs:366` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:11— docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:11-24 | docs/vocs/docs/snippets/sources/exex/tracking-state/src/bin/1.rs:26-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:220— crates/prune/prune/src/segments/user/account_history.rs:220-233 | crates/prune/prune/src/segments/user/storage_history.rs:222-235 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/cli/commands/src/download/extract.rs:418— crates/cli/commands/src/download/extract.rs:418-431 | crates/cli/commands/src/download/extract.rs:463-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/download/extract.rs:418` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Discv4Service::poll (cognitive 54) crates/net/discv4/src/lib.rs:1891— Discv4Service::poll has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 7 (14 pts), match/switch 3 (10 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Discv4Service::on_neighbours (cognitive 35) crates/net/discv4/src/lib.rs:1530— Discv4Service::on_neighbours has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 3 (6 pts), loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Discv4Service::on_ping (cognitive 22) crates/net/discv4/src/lib.rs:1197— Discv4Service::on_ping has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Discv4Service::evict_expired_requests (cognitive 16) crates/net/discv4/src/lib.rs:1694— Discv4Service::evict_expired_requests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PeersManager::on_connection_failure (cognitive 37) crates/net/network/src/peers.rs:819— PeersManager::on_connection_failure has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 3 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PeersManager::poll (cognitive 35) crates/net/network/src/peers.rs:1388— PeersManager::poll has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PeersManager::apply_reputation_change (cognitive 22) crates/net/network/src/peers.rs:614— PeersManager::apply_reputation_change has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PeersManager::new (cognitive 20) crates/net/network/src/peers.rs:119— PeersManager::new has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskFileBlobStore::get_by_versioned_hashes_eip7594 (cognitive 34) crates/transaction-pool/src/blobstore/disk.rs:76— DiskFileBlobStore::get_by_versioned_hashes_eip7594 has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskFileBlobStore::get_by_versioned_hashes_cells_eip7594 (cognitive 32) crates/transaction-pool/src/blobstore/disk.rs:146— DiskFileBlobStore::get_by_versioned_hashes_cells_eip7594 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskFileBlobStore::get_by_versioned_hashes_v1 (cognitive 27) crates/transaction-pool/src/blobstore/disk.rs:304— DiskFileBlobStore::get_by_versioned_hashes_v1 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskFileBlobStore::has_versioned_hashes (cognitive 20) crates/transaction-pool/src/blobstore/disk.rs:395— DiskFileBlobStore::has_versioned_hashes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: reth_cli_commands::download::manifest::generate_manifest crates/cli/commands/src/download/manifest.rs:710— FunctionTooLong — reth_cli_commands::download::manifest::generate_manifest runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: reth_cli_commands::import_core::import_blocks_from_file crates/cli/commands/src/import_core.rs:84— FunctionTooLong — reth_cli_commands::import_core::import_blocks_from_file runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: reth_network::session::authenticate_stream crates/net/network/src/session/mod.rs:1230— FunctionTooLong — reth_network::session::authenticate_stream runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: inject-cargo-docs.injectCargoDocs docs/vocs/scripts/inject-cargo-docs.ts:9— FunctionTooLong — injectCargoDocs runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Change-coupling hub: mod.rs → test_utils.rs, engine_store.rs, input.rs crates/engine/tree/src/tree/mod.rs— `crates/engine/tree/src/tree/mod.rs` changes together with 3 other files — `crates/engine/tree/src/test_utils.rs`, `crates/engine/util/src/engine_store.rs`, `crates/trie/common/src/input.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: metrics.rs → common.rs, common.rs, rocksdb.rs crates/storage/provider/src/providers/rocksdb/metrics.rs— `crates/storage/provider/src/providers/rocksdb/metrics.rs` changes together with 3 other files — `crates/cli/commands/src/common.rs`, `crates/node/builder/src/launch/common.rs`, `crates/storage/provider/src/bal/rocksdb.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: db.rs → canonical.rs, historical.rs, latest.rs, mock.rs, trie.rs crates/rpc/rpc-eth-types/src/cache/db.rs— `crates/rpc/rpc-eth-types/src/cache/db.rs` changes together with 5 other files — `crates/chain-state/src/in_memory/canonical.rs`, `crates/storage/provider/src/providers/state/historical.rs`, `crates/storage/provider/src/providers/state/latest.rs`, `crates/storage/provider/src/test_utils/mock.rs`, `crates/storage/storage-api/src/trie.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
Change-coupling hub: canonical.rs → latest.rs, trie.rs, input.rs crates/chain-state/src/in_memory/canonical.rs— `crates/chain-state/src/in_memory/canonical.rs` changes together with 3 other files — `crates/storage/provider/src/providers/state/latest.rs`, `crates/storage/storage-api/src/trie.rs`, `crates/trie/common/src/input.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/cli/commands/src/db/repair_trie.rs:75— crates/cli/commands/src/db/repair_trie.rs:75-117 | crates/cli/commands/src/prune.rs:37-131 | crates/cli/commands/src/stage/run.rs:115-387 | crates/node/builder/src/launch/common.rs:800-848 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/cli/commands/src/db/stats.rs:78— crates/cli/commands/src/db/stats.rs:78-157 | crates/cli/commands/src/db/stats.rs:159-221 | crates/cli/commands/src/db/stats.rs:226-406 | crates/cli/commands/src/db/stats.rs:408-446 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/cli/commands/src/stage/dump/execution.rs:34— crates/cli/commands/src/stage/dump/execution.rs:34-58 | crates/cli/commands/src/stage/dump/hashing_account.rs:22-51 | crates/cli/commands/src/stage/dump/hashing_storage.rs:21-41 | crates/cli/commands/src/stage/dump/merkle.rs:41-77 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/rpc/rpc-engine-api/src/engine_api.rs:1128— crates/rpc/rpc-engine-api/src/engine_api.rs:1128-1146 | crates/rpc/rpc-engine-api/src/engine_api.rs:1172-1190 | crates/rpc/rpc-engine-api/src/engine_api.rs:1195-1219 | crates/rpc/rpc-engine-api/src/engine_api.rs:1225-1250 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×4
Edited copy of a member (26 corresponding lines) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:9— docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:9-34 | docs/vocs/docs/snippets/sources/exex/tracking-state/src/bin/1.rs:22-51 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:2549— crates/storage/provider/src/providers/database/provider.rs:2549-2574 | crates/storage/provider/src/providers/database/provider.rs:2579-2611 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) crates/engine/util/src/skip_fcu.rs:42— crates/engine/util/src/skip_fcu.rs:42-67 | crates/engine/util/src/skip_new_payload.rs:38-64 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) crates/storage/nippy-jar/src/cursor.rs:79— crates/storage/nippy-jar/src/cursor.rs:79-104 | crates/storage/nippy-jar/src/cursor.rs:119-145 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×4
Edited copy of a member (22 corresponding lines) crates/trie/common/src/range_proof.rs:81— crates/trie/common/src/range_proof.rs:81-110 | crates/trie/common/src/range_proof.rs:130-151 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/trie/common/src/hashed_state.rs:101— crates/trie/common/src/hashed_state.rs:101-122 | crates/trie/common/src/hashed_state.rs:468-495 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/prune/prune/src/segments/user/account_history.rs:65— crates/prune/prune/src/segments/user/account_history.rs:65-86 | crates/prune/prune/src/segments/user/storage_history.rs:66-87 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/e2e-test-utils/src/testsuite/actions/fork.rs:168— crates/e2e-test-utils/src/testsuite/actions/fork.rs:168-190 | crates/e2e-test-utils/src/testsuite/actions/reorg.rs:99-120 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) crates/trie/trie/src/hashed_cursor/metrics.rs:133— crates/trie/trie/src/hashed_cursor/metrics.rs:133-138 | crates/trie/trie/src/trie_cursor/metrics.rs:136-141 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/snap-sync/src/account/download.rs:62— crates/snap-sync/src/account/download.rs:62-67 | crates/snap-sync/src/account/download.rs:93-98 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/transaction-pool/src/pool/parked.rs:146— crates/transaction-pool/src/pool/parked.rs:146-152 | crates/transaction-pool/src/pool/pending.rs:587-592 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/stages/stages/src/test_utils/test_db.rs:138— crates/stages/stages/src/test_utils/test_db.rs:138-145 | crates/storage/storage-api/src/database_provider.rs:58-63 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) crates/cli/commands/src/db/get.rs:392— crates/cli/commands/src/db/get.rs:392-408 | crates/cli/commands/src/db/get.rs:466-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/db/get.rs:392` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) crates/rpc/rpc-engine-api/src/engine_api.rs:1199— crates/rpc/rpc-engine-api/src/engine_api.rs:1199-1215 | crates/rpc/rpc-engine-api/src/engine_api.rs:1230-1246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) crates/tasks/src/worker_map.rs:63— crates/tasks/src/worker_map.rs:63-79 | crates/tasks/src/worker_map.rs:94-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/tasks/src/worker_map.rs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:267— crates/trie/trie/src/hashed_cursor/post_state.rs:267-283 | crates/trie/trie/src/trie_cursor/in_memory.rs:217-233 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/hashed_cursor/post_state.rs:267` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) crates/transaction-pool/src/blobstore/disk.rs:161— crates/transaction-pool/src/blobstore/disk.rs:161-175 | crates/transaction-pool/src/blobstore/mem.rs:63-77 — before extracting anything, compare `crates/transaction-pool/src/blobstore/disk.rs` and `crates/transaction-pool/src/blobstore/mem.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/disk.rs:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) crates/trie/trie/src/hashed_cursor/post_state.rs:325— crates/trie/trie/src/hashed_cursor/post_state.rs:325-339 | crates/trie/trie/src/trie_cursor/in_memory.rs:310-324 — before extracting anything, compare `crates/trie/trie/src/hashed_cursor/post_state.rs` and `crates/trie/trie/src/trie_cursor/in_memory.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/hashed_cursor/post_state.rs:325` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `B256` in one and `Nibbles` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) crates/storage/db-common/src/init.rs:1045— crates/storage/db-common/src/init.rs:1045-1059 | crates/storage/db-common/src/init.rs:1150-1164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) crates/node/core/src/args/rpc_state_cache.rs:106— crates/node/core/src/args/rpc_state_cache.rs:106-120 | crates/rpc/rpc-eth-types/src/cache/config.rs:67-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–14 lines × 2) crates/cli/commands/src/stage/dump/execution.rs:145— crates/cli/commands/src/stage/dump/execution.rs:145-157 | crates/cli/commands/src/stage/dump/hashing_storage.rs:54-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) crates/cli/runner/src/lib.rs:110— crates/cli/runner/src/lib.rs:110-123 | crates/cli/runner/src/lib.rs:170-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/runner/src/lib.rs:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) crates/storage/provider/src/providers/static_file/manager.rs:2468— crates/storage/provider/src/providers/static_file/manager.rs:2468-2481 | crates/storage/provider/src/providers/static_file/manager.rs:2572-2584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/static_file/manager.rs:2468` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) crates/transaction-pool/src/pool/txpool.rs:241— crates/transaction-pool/src/pool/txpool.rs:241-254 | crates/transaction-pool/src/pool/txpool.rs:261-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Discv4Service::poll (cyclomatic 35) crates/net/discv4/src/lib.rs:1891— Discv4Service::poll has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Discv4Service::on_neighbours (cyclomatic 18) crates/net/discv4/src/lib.rs:1530— Discv4Service::on_neighbours has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Discv4Service::on_ping (cyclomatic 17) crates/net/discv4/src/lib.rs:1197— Discv4Service::on_ping has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransactionsManager::import_transactions (cyclomatic 24) crates/net/network/src/transactions/mod.rs:1347— TransactionsManager::import_transactions has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransactionsManager::on_new_pooled_transaction_hashes (cyclomatic 18) crates/net/network/src/transactions/mod.rs:676— TransactionsManager::on_new_pooled_transaction_hashes has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransactionsManager::propagate_transactions (cyclomatic 16) crates/net/network/src/transactions/mod.rs:995— TransactionsManager::propagate_transactions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatabaseProvider::take_state_above (cyclomatic 24) crates/storage/provider/src/providers/database/provider.rs:3076— DatabaseProvider::take_state_above has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatabaseProvider::save_blocks_inner (cyclomatic 23) crates/storage/provider/src/providers/database/provider.rs:574— DatabaseProvider::save_blocks_inner has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DatabaseProvider::remove_state_above (cyclomatic 19) crates/storage/provider/src/providers/database/provider.rs:2938— DatabaseProvider::remove_state_above has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_rpc_eth_types::cache::db::apply_state_overrides_with_state (cyclomatic 19) crates/rpc/rpc-eth-types/src/cache/db.rs:98— reth_rpc_eth_types::cache::db::apply_state_overrides_with_state has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_rpc_eth_types::simulate::execute_transactions (cyclomatic 18) crates/rpc/rpc-eth-types/src/simulate.rs:317— reth_rpc_eth_types::simulate::execute_transactions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_rpc_eth_types::simulate::resolve_transaction_with_account (cyclomatic 16) crates/rpc/rpc-eth-types/src/simulate.rs:505— reth_rpc_eth_types::simulate::resolve_transaction_with_account has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransactionsManager::propagate_transactions (cognitive 39) crates/net/network/src/transactions/mod.rs:995— TransactionsManager::propagate_transactions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 6 (17 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionsManager::import_transactions (cognitive 30) crates/net/network/src/transactions/mod.rs:1347— TransactionsManager::import_transactions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 2 (3 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionsManager::on_new_pooled_transaction_hashes (cognitive 17) crates/net/network/src/transactions/mod.rs:676— TransactionsManager::on_new_pooled_transaction_hashes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 2, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Pipeline::unwind_stages (cognitive 32) crates/stages/api/src/pipeline/mod.rs:374— Pipeline::unwind_stages has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline::execute_stage_to_completion (cognitive 24) crates/stages/api/src/pipeline/mod.rs:537— Pipeline::execute_stage_to_completion has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline::on_stage_error (cognitive 18) crates/stages/api/src/pipeline/mod.rs:655— Pipeline::on_stage_error has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaticFileProvider::update_index (cognitive 26) crates/storage/provider/src/providers/static_file/manager.rs:1113— StaticFileProvider::update_index has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StaticFileProvider::check_consistency (cognitive 26) crates/storage/provider/src/providers/static_file/manager.rs:1332— StaticFileProvider::check_consistency has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaticFileProvider::ensure_invariants (cognitive 20) crates/storage/provider/src/providers/static_file/manager.rs:1735— StaticFileProvider::ensure_invariants has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RocksDBBatch::prune_account_history_batch (cognitive 25) crates/storage/provider/src/providers/rocksdb/provider.rs:2389— RocksDBBatch::prune_account_history_batch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RocksDBBatch::prune_storage_history_batch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RocksDBBatch::prune_storage_history_batch (cognitive 25) crates/storage/provider/src/providers/rocksdb/provider.rs:2543— RocksDBBatch::prune_storage_history_batch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RocksDBBatch::prune_account_history_batch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RocksDBBatch::prune_history_shards_inner (cognitive 16) crates/storage/provider/src/providers/rocksdb/provider.rs:2299— RocksDBBatch::prune_history_shards_inner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PrewarmCacheTask::refresh_results (cognitive 23) crates/engine/tree/src/tree/payload_processor/prewarm.rs:263— PrewarmCacheTask::refresh_results has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrewarmCacheTask::transact_worker (cognitive 22) crates/engine/tree/src/tree/payload_processor/prewarm.rs:325— PrewarmCacheTask::transact_worker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrewarmCacheTask::spawn_txs_prewarm (cognitive 16) crates/engine/tree/src/tree/payload_processor/prewarm.rs:157— PrewarmCacheTask::spawn_txs_prewarm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×3
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/net/discv4/src/proto.rs:283— crates/net/discv4/src/proto.rs:283-309 | crates/net/discv4/src/proto.rs:325-351 | crates/net/discv4/src/proto.rs:368-394 | crates/net/discv4/src/proto.rs:503-537 | crates/net/discv4/src/proto.rs:590-621 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/net/network/src/fetch/mod.rs:389— crates/net/network/src/fetch/mod.rs:389-418 | crates/net/network/src/fetch/mod.rs:425-440 | crates/net/network/src/fetch/mod.rs:447-461 | crates/net/network/src/fetch/mod.rs:471-485 | crates/net/network/src/fetch/mod.rs:492-521 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/storage/provider/src/test_utils/blocks.rs:190— crates/storage/provider/src/test_utils/blocks.rs:190-233 | crates/storage/provider/src/test_utils/blocks.rs:240-291 | crates/storage/provider/src/test_utils/blocks.rs:298-349 | crates/storage/provider/src/test_utils/blocks.rs:356-432 | crates/storage/provider/src/test_utils/blocks.rs:439-512 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) crates/transaction-pool/src/validate/task.rs:270— crates/transaction-pool/src/validate/task.rs:270-291 | crates/transaction-pool/src/validate/task.rs:297-315 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/engine/tree/src/tree/payload_processor/reuse.rs:882— crates/engine/tree/src/tree/payload_processor/reuse.rs:882-900 | crates/engine/tree/src/tree/payload_processor/reuse.rs:917-937 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/storage/storage-overlay/src/manager.rs:732— crates/storage/storage-overlay/src/manager.rs:732-750 | crates/storage/storage-overlay/src/manager.rs:758-780 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) crates/rpc/rpc/src/trace.rs:610— crates/rpc/rpc/src/trace.rs:610-639 | crates/rpc/rpc/src/trace.rs:646-679 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:1337— crates/storage/provider/src/providers/static_file/writer.rs:1337-1368 | crates/storage/provider/src/providers/static_file/writer.rs:1400-1429 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) crates/ethereum/engine-primitives/src/payload.rs:142— crates/ethereum/engine-primitives/src/payload.rs:142-171 | crates/ethereum/engine-primitives/src/payload.rs:176-208 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×3
Edited copy of a member (24 corresponding lines) crates/trie/common/src/proofs.rs:735— crates/trie/common/src/proofs.rs:735-759 | crates/trie/common/src/proofs.rs:785-808 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) crates/transaction-pool/src/blobstore/mem.rs:27— crates/transaction-pool/src/blobstore/mem.rs:27-52 | crates/transaction-pool/src/blobstore/mem.rs:59-82 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) crates/storage/provider/src/test_utils/mod.rs:83— crates/storage/provider/src/test_utils/mod.rs:83-111 | crates/storage/provider/src/test_utils/mod.rs:120-143 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×3
Edited copy of a member (21 corresponding lines) crates/trie/common/src/updates.rs:161— crates/trie/common/src/updates.rs:161-181 | crates/trie/common/src/updates.rs:185-207 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/storage/provider/src/either_writer.rs:859— crates/storage/provider/src/either_writer.rs:859-880 | crates/storage/provider/src/either_writer.rs:906-926 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/stages/stages/src/stages/hashing_account.rs:289— crates/stages/stages/src/stages/hashing_account.rs:289-309 | crates/stages/stages/src/stages/hashing_storage.rs:230-250 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) crates/net/ecies/src/algorithm.rs:453— crates/net/ecies/src/algorithm.rs:453-470 | crates/net/ecies/src/algorithm.rs:529-548 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/net/network/src/error.rs:248— crates/net/network/src/error.rs:248-267 | crates/net/network/src/error.rs:269-286 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:762— crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:762-779 | crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:956-978 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) crates/node/core/src/args/debug.rs:271— crates/node/core/src/args/debug.rs:271-273 | crates/rpc/rpc-server-types/src/module.rs:283-289 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) crates/evm/execution-types/src/execute.rs:48— crates/evm/execution-types/src/execute.rs:48-50 | crates/evm/execution-types/src/execution_outcome.rs:189-191 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) crates/storage/provider/src/test_utils/mock.rs:1023— crates/storage/provider/src/test_utils/mock.rs:1023-1025 | crates/storage/storage-api/src/state.rs:77-82 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (22 lines × 2) crates/cli/commands/src/db/state.rs:72— crates/cli/commands/src/db/state.rs:72-93 | crates/cli/commands/src/db/state.rs:99-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) crates/cli/commands/src/stage/run.rs:167— crates/cli/commands/src/stage/run.rs:167-188 | crates/cli/commands/src/stage/run.rs:218-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/cli/commands/src/stage/run.rs:216` calls `extend`, `clone` and `crates/cli/commands/src/stage/run.rs:165` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:185— crates/prune/prune/src/segments/user/account_history.rs:185-206 | crates/prune/prune/src/segments/user/storage_history.rs:187-208 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/user/account_history.rs:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) crates/stages/stages/src/stages/index_account_history.rs:96— crates/stages/stages/src/stages/index_account_history.rs:96-115 | crates/stages/stages/src/stages/index_storage_history.rs:100-119 — before extracting anything, compare `crates/stages/stages/src/stages/index_account_history.rs` and `crates/stages/stages/src/stages/index_storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/index_account_history.rs:96` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 2) crates/storage/provider/src/changeset_walker.rs:39— crates/storage/provider/src/changeset_walker.rs:39-58 | crates/storage/provider/src/changeset_walker.rs:121-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (20 lines × 2) crates/trie/common/src/hashed_state.rs:533— crates/trie/common/src/hashed_state.rs:533-552 | crates/trie/common/src/updates.rs:614-633 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 2) crates/cli/commands/src/stage/dump/execution.rs:76— crates/cli/commands/src/stage/dump/execution.rs:76-83 | crates/cli/commands/src/stage/dump/merkle.rs:44-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/stage/dump/execution.rs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2241— crates/storage/provider/src/providers/rocksdb/provider.rs:2241-2248 | crates/storage/provider/src/providers/rocksdb/provider.rs:2275-2283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2694— crates/storage/provider/src/providers/rocksdb/provider.rs:2694-2701 | crates/storage/provider/src/providers/rocksdb/provider.rs:2728-2736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) crates/storage/provider/src/providers/database/provider.rs:1422— crates/storage/provider/src/providers/database/provider.rs:1422-1429 | crates/storage/provider/src/providers/rocksdb/provider.rs:1661-1667 | crates/storage/provider/src/providers/rocksdb/provider.rs:2171-2177 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:1422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) crates/tasks/src/runtime.rs:709— crates/tasks/src/runtime.rs:709-715 | crates/tasks/src/runtime.rs:778-784 | crates/tasks/src/runtime.rs:847-853 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:15— docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:15-21 | docs/vocs/docs/snippets/sources/exex/remote/src/consumer.rs:22-28 | docs/vocs/docs/snippets/sources/exex/tracking-state/src/bin/1.rs:30-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/3.rs:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×3
Length read from the parsed input is spent without ever being bounded crates/etl/src/lib.rs:270— `key_length` is read from the bytes being parsed at line 268 (`usize::from_be_bytes`), then used to size a `vec![…; n]` at line 270 — and nowhere in its scope is `key_length` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `key_length` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/etl/src/lib.rs:271— `value_length` is read from the bytes being parsed at line 269 (`usize::from_be_bytes`), then used to size a `vec![…; n]` at line 271 — and nowhere in its scope is `value_length` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `value_length` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/era/src/e2s/types.rs:231— `count` is read from the bytes being parsed at line 208 (`i64::from_le_bytes`), then used to size a `Vec::with_capacity` at line 231 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating.
AXI1 · Runtime container hardening· Container process runs as root · ×2
Container process runs as root: reth-promtail-1 — 'reth-promtail-1' (grafana/promtail:latest) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
Container process runs as root: reth-reth-1 — 'reth-reth-1' (ghcr.io/paradigmxyz/reth) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
ActiveSession::on_incoming_message (cyclomatic 60) crates/net/network/src/session/active.rs:263— ActiveSession::on_incoming_message has cyclomatic complexity 60 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ActiveSession::poll (cyclomatic 41) crates/net/network/src/session/active.rs:775— ActiveSession::poll has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NetworkManager::on_handle_message (cyclomatic 35) crates/net/network/src/manager.rs:696— NetworkManager::on_handle_message has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NetworkManager::on_swarm_event (cyclomatic 23) crates/net/network/src/manager.rs:816— NetworkManager::on_swarm_event has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AllTransactions::update_txs (cyclomatic 19) crates/transaction-pool/src/pool/txpool.rs:1640— AllTransactions::update_txs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AllTransactions::insert_tx (cyclomatic 17) crates/transaction-pool/src/pool/txpool.rs:2119— AllTransactions::insert_tx has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthSimBundle::sim_bundle_inner (cyclomatic 18) crates/rpc/rpc/src/eth/sim_bundle.rs:276— EthSimBundle::sim_bundle_inner has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthSimBundle::parse_and_flatten_bundle (cyclomatic 17) crates/rpc/rpc/src/eth/sim_bundle.rs:148— EthSimBundle::parse_and_flatten_bundle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActiveSession::poll (cognitive 90) crates/net/network/src/session/active.rs:775— ActiveSession::poll has cognitive complexity 90 (threshold 15). Drivers by points: match/switch 11 (37 pts), if/else 15 (36 pts), loops 8 (15 pts), boolean chains 2 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActiveSession::on_incoming_message (cognitive 66) crates/net/network/src/session/active.rs:263— ActiveSession::on_incoming_message has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (36 pts), match/switch 11 (30 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AllTransactions::update_txs (cognitive 59) crates/transaction-pool/src/pool/txpool.rs:1640— AllTransactions::update_txs has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (47 pts), loops 5 (12 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AllTransactions::insert_tx (cognitive 29) crates/transaction-pool/src/pool/txpool.rs:2119— AllTransactions::insert_tx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthSimBundle::parse_and_flatten_bundle (cognitive 44) crates/rpc/rpc/src/eth/sim_bundle.rs:148— EthSimBundle::parse_and_flatten_bundle has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (11 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthSimBundle::sim_bundle_inner (cognitive 28) crates/rpc/rpc/src/eth/sim_bundle.rs:276— EthSimBundle::sim_bundle_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Discovery::new (cognitive 43) crates/net/network/src/discovery.rs:90— Discovery::new has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 4 (7 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Discovery::poll (cognitive 23) crates/net/network/src/discovery.rs:421— Discovery::poll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthFilterInner::logs_for_filter (cognitive 41) crates/rpc/rpc/src/eth/filter.rs:480— EthFilterInner::logs_for_filter has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (34 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EthFilterInner::get_logs_in_block_range_inner (cognitive 20) crates/rpc/rpc/src/eth/filter.rs:713— EthFilterInner::get_logs_in_block_range_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthTransactionValidator::validate_stateless (cognitive 41) crates/transaction-pool/src/validate/eth.rs:457— EthTransactionValidator::validate_stateless has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthTransactionValidator::validate_eip4844 (cognitive 29) crates/transaction-pool/src/validate/eth.rs:806— EthTransactionValidator::validate_eip4844 has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ProofCalculator::next_uncached_key_range (cognitive 36) crates/trie/trie/src/proof_v2/calculator.rs:971— ProofCalculator::next_uncached_key_range has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ProofCalculator::proof_subtrie (cognitive 20) crates/trie/trie/src/proof_v2/calculator.rs:1209— ProofCalculator::proof_subtrie has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RlpxSatelliteStream::poll_next (cognitive 34) crates/net/eth-wire/src/multiplex.rs:828— RlpxSatelliteStream::poll_next has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RlpxSatelliteStream::poll_outbound_producers (cognitive 16) crates/net/eth-wire/src/multiplex.rs:749— RlpxSatelliteStream::poll_outbound_producers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthRequestHandler::get_headers_response (cognitive 33) crates/net/network/src/eth_requests.rs:165— EthRequestHandler::get_headers_response has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthRequestHandler::on_receipts70_request (cognitive 23) crates/net/network/src/eth_requests.rs:332— EthRequestHandler::on_receipts70_request has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthCall::simulate_v1 (cognitive 33) crates/rpc/rpc-eth-api/src/helpers/call.rs:67— EthCall::simulate_v1 has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthCall::call_many (cognitive 18) crates/rpc/rpc-eth-api/src/helpers/call.rs:297— EthCall::call_many has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BasicEngineValidator::validate_block_with_state (cognitive 31) crates/engine/tree/src/tree/payload_validator.rs:470— BasicEngineValidator::validate_block_with_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (23 pts), match/switch 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BasicEngineValidator::execute_transactions (cognitive 16) crates/engine/tree/src/tree/payload_validator.rs:1206— BasicEngineValidator::execute_transactions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_stages::stages::execution::slot_preimages::inject_plain_wipe_slots (cognitive 30) crates/stages/stages/src/stages/execution/slot_preimages.rs:132— reth_stages::stages::execution::slot_preimages::inject_plain_wipe_slots has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 5 (14 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
reth_stages::stages::sender_recovery::recover_range (cognitive 17) crates/stages/stages/src/stages/sender_recovery.rs:222— reth_stages::stages::sender_recovery::recover_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidationApi::validate_message_against_block (cognitive 26) crates/rpc/rpc/src/validation.rs:159— ValidationApi::validate_message_against_block has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidationApi::ensure_payment (cognitive 16) crates/rpc/rpc/src/validation.rs:321— ValidationApi::ensure_payment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SpawnedDownloader::poll (cognitive 25) crates/net/downloaders/src/bodies/task.rs:83— SpawnedDownloader::poll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpawnedDownloader::poll (cognitive 19) crates/net/downloaders/src/headers/task.rs:95— SpawnedDownloader::poll has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 1 (4 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DebugApi::debug_subscribe (cognitive 25) crates/rpc/rpc/src/debug.rs:1038— DebugApi::debug_subscribe has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 6 (10 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DebugApi::trace_chain_block (cognitive 16) crates/rpc/rpc/src/debug.rs:188— DebugApi::trace_chain_block has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaticFileProviderRW::heal_changeset_sidecar (cognitive 24) crates/storage/provider/src/providers/static_file/writer.rs:392— StaticFileProviderRW::heal_changeset_sidecar has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaticFileProviderRW::truncate (cognitive 17) crates/storage/provider/src/providers/static_file/writer.rs:1030— StaticFileProviderRW::truncate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparseTrieCacheTask::promote_pending_account_updates (cognitive 21) crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:1033— SparseTrieCacheTask::promote_pending_account_updates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparseTrieCacheTask::run_ready_storage_work (cognitive 16) crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:816— SparseTrieCacheTask::run_ready_storage_work has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_engine_tree::tree::payload_processor::bal::worker::spawn_worker (cognitive 20) crates/engine/tree/src/tree/payload_processor/bal/worker.rs:66— reth_engine_tree::tree::payload_processor::bal::worker::spawn_worker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_engine_tree::tree::payload_processor::bal_prewarm_pool::prewarm_loop (cognitive 20) crates/engine/tree/src/tree/payload_processor/bal_prewarm_pool.rs:159— reth_engine_tree::tree::payload_processor::bal_prewarm_pool::prewarm_loop has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 3 (8 pts), if/else 1 (3 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
reth_payload_primitives::validate_payload_timestamp (cognitive 20) crates/payload/primitives/src/lib.rs:76— reth_payload_primitives::validate_payload_timestamp has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
reth_payload_primitives::validate_slot_number_presence (cognitive 17) crates/payload/primitives/src/lib.rs:317— reth_payload_primitives::validate_slot_number_presence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ArenaCursor::next (cognitive 19) crates/trie/sparse/src/arena/cursor.rs:298— ArenaCursor::next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaCursor::seek (cognitive 18) crates/trie/sparse/src/arena/cursor.rs:363— ArenaCursor::seek has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_era_utils::history::import (cognitive 16) crates/era-utils/src/history.rs:238— reth_era_utils::history::import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
reth_era_utils::history::process_iter (cognitive 16) crates/era-utils/src/history.rs:625— reth_era_utils::history::process_iter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) crates/storage/libmdbx-rs/src/cursor.rs:561— crates/storage/libmdbx-rs/src/cursor.rs:561-596 | crates/storage/libmdbx-rs/src/cursor.rs:656-691 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) crates/e2e-test-utils/src/testsuite/actions/fork.rs:124— crates/e2e-test-utils/src/testsuite/actions/fork.rs:124-161 | crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs:415-445 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (72 corresponding lines) · ×2
Edited copy of a member (72 corresponding lines) crates/storage/db-common/src/init.rs:1044— crates/storage/db-common/src/init.rs:1044-1125 | crates/storage/db-common/src/init.rs:1149-1220 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (72 corresponding lines) crates/prune/prune/src/segments/user/account_history.rs:100— crates/prune/prune/src/segments/user/account_history.rs:100-171 | crates/prune/prune/src/segments/user/storage_history.rs:101-173 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×2
Edited copy of a member (63 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:2226— crates/storage/provider/src/providers/rocksdb/provider.rs:2226-2288 | crates/storage/provider/src/providers/rocksdb/provider.rs:2678-2744 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (63 corresponding lines) crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:66— crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:66-128 | crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:260-334 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×2
Edited copy of a member (54 corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:2497— crates/storage/provider/src/providers/static_file/manager.rs:2497-2554 | crates/storage/provider/src/providers/static_file/manager.rs:2602-2655 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) crates/storage/provider/src/providers/consistent.rs:1244— crates/storage/provider/src/providers/consistent.rs:1244-1298 | crates/storage/provider/src/providers/consistent.rs:1393-1446 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) crates/net/peers/src/node_record.rs:175— crates/net/peers/src/node_record.rs:175-206 | crates/net/peers/src/trusted_peer.rs:118-163 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) crates/trie/trie/src/trie.rs:695— crates/trie/trie/src/trie.rs:695-728 | crates/trie/trie/src/trie.rs:740-771 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) crates/trie/common/src/proofs.rs:232— crates/trie/common/src/proofs.rs:232-269 | crates/trie/common/src/proofs.rs:358-394 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) crates/trie/common/src/hashed_state.rs:1809— crates/trie/common/src/hashed_state.rs:1809-1845 | crates/trie/common/src/updates.rs:1527-1564 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1266— crates/storage/provider/src/providers/rocksdb/provider.rs:1266-1311 | crates/storage/provider/src/providers/rocksdb/provider.rs:1321-1358 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) crates/transaction-pool/src/pool/pending.rs:175— crates/transaction-pool/src/pool/pending.rs:175-212 | crates/transaction-pool/src/pool/pending.rs:226-265 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×2
Edited copy of a member (39 corresponding lines) crates/storage/provider/src/providers/rocksdb/provider.rs:1636— crates/storage/provider/src/providers/rocksdb/provider.rs:1636-1674 | crates/storage/provider/src/providers/rocksdb/provider.rs:2142-2186 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) crates/storage/storage-overlay/src/manager.rs:919— crates/storage/storage-overlay/src/manager.rs:919-964 | crates/storage/storage-overlay/src/manager.rs:1030-1068 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) crates/storage/provider/src/providers/database/provider.rs:3505— crates/storage/provider/src/providers/database/provider.rs:3505-3539 | crates/storage/provider/src/providers/database/provider.rs:3562-3600 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:248— crates/trie/trie/src/hashed_cursor/post_state.rs:248-283 | crates/trie/trie/src/trie_cursor/in_memory.rs:199-233 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) crates/net/network/src/session/mod.rs:302— crates/net/network/src/session/mod.rs:302-351 | crates/net/network/src/session/mod.rs:366-406 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) crates/stages/stages/src/stages/utils.rs:319— crates/stages/stages/src/stages/utils.rs:319-359 | crates/stages/stages/src/stages/utils.rs:541-581 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×2
Edited copies of one member (3 members, 19+ corresponding lines) docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs:31— docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs:31-49 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs:47-65 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:67-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) crates/trie/common/src/prefix_set.rs:281— crates/trie/common/src/prefix_set.rs:281-304 | crates/trie/common/src/prefix_set.rs:312-335 | crates/trie/common/src/prefix_set.rs:339-357 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) crates/storage/provider/src/providers/database/mod.rs:382— crates/storage/provider/src/providers/database/mod.rs:382-406 | crates/storage/provider/src/providers/database/mod.rs:413-431 | crates/storage/provider/src/providers/database/mod.rs:442-458 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) crates/rpc/rpc-engine-api/src/engine_api.rs:1392— crates/rpc/rpc-engine-api/src/engine_api.rs:1392-1409 | crates/rpc/rpc-engine-api/src/engine_api.rs:1422-1438 | crates/rpc/rpc-engine-api/src/engine_api.rs:1450-1468 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) crates/rpc/rpc-eth-types/src/cache/mod.rs:448— crates/rpc/rpc-eth-types/src/cache/mod.rs:448-460 | crates/rpc/rpc-eth-types/src/cache/mod.rs:467-479 | crates/rpc/rpc-eth-types/src/cache/mod.rs:486-501 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) crates/engine/execution-cache/src/cached_state.rs:1045— crates/engine/execution-cache/src/cached_state.rs:1045-1057 | crates/engine/execution-cache/src/cached_state.rs:1065-1077 | crates/engine/execution-cache/src/cached_state.rs:1084-1096 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×2
Edited copies of one member (4 members, 11+ corresponding lines) crates/node/core/src/args/pruning.rs:345— crates/node/core/src/args/pruning.rs:345-355 | crates/node/core/src/args/pruning.rs:357-367 | crates/node/core/src/args/pruning.rs:387-397 | crates/node/core/src/args/pruning.rs:399-409 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 11+ corresponding lines) crates/storage/provider/src/either_writer.rs:105— crates/storage/provider/src/either_writer.rs:105-115 | crates/storage/provider/src/either_writer.rs:125-136 | crates/storage/provider/src/either_writer.rs:147-158 | crates/storage/provider/src/either_writer.rs:168-179 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (31 lines × 2) crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:399— crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:399-429 | crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:438-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/engine/tree/src/tree/state_root_strategy/sparse_trie.rs:399` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31 lines × 2) crates/storage/provider/src/providers/database/provider.rs:3017— crates/storage/provider/src/providers/database/provider.rs:3017-3047 | crates/storage/provider/src/providers/database/provider.rs:3182-3212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:3017` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–25 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:103— crates/prune/prune/src/segments/user/account_history.rs:103-127 | crates/prune/prune/src/segments/user/storage_history.rs:104-125 — before extracting anything, compare `crates/prune/prune/src/segments/user/account_history.rs` and `crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/user/account_history.rs:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–25 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:125— crates/prune/prune/src/segments/user/account_history.rs:125-146 | crates/prune/prune/src/segments/user/account_history.rs:272-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25 lines × 2) crates/stages/stages/src/stages/utils.rs:321— crates/stages/stages/src/stages/utils.rs:321-345 | crates/stages/stages/src/stages/utils.rs:543-567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:321` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:72— crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:72-96 | crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:276-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) crates/storage/provider/src/test_utils/mock.rs:1255— crates/storage/provider/src/test_utils/mock.rs:1255-1277 | crates/storage/storage-api/src/noop.rs:631-653 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) crates/trie/common/src/proofs.rs:274— crates/trie/common/src/proofs.rs:274-296 | crates/trie/common/src/proofs.rs:399-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) crates/rpc/rpc-eth-api/src/helpers/transaction.rs:534— crates/rpc/rpc-eth-api/src/helpers/transaction.rs:534-552 | crates/rpc/rpc-eth-api/src/helpers/transaction.rs:616-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) crates/transaction-pool/src/pool/txpool.rs:275— crates/transaction-pool/src/pool/txpool.rs:275-293 | crates/transaction-pool/src/pool/txpool.rs:296-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/pool/txpool.rs:275` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) crates/cli/commands/src/stage/dump/hashing_account.rs:88— crates/cli/commands/src/stage/dump/hashing_account.rs:88-105 | crates/cli/commands/src/stage/dump/hashing_storage.rs:83-100 — before extracting anything, compare `crates/cli/commands/src/stage/dump/hashing_account.rs` and `crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/stage/dump/hashing_account.rs:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) crates/prune/prune/src/segments/receipts.rs:61— crates/prune/prune/src/segments/receipts.rs:61-78 | crates/prune/prune/src/segments/user/sender_recovery.rs:112-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/receipts.rs:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) crates/cli/commands/src/stage/dump/hashing_account.rs:36— crates/cli/commands/src/stage/dump/hashing_account.rs:36-51 | crates/cli/commands/src/stage/dump/hashing_storage.rs:26-41 | crates/cli/commands/src/stage/dump/merkle.rs:62-77 — before extracting anything, compare `crates/cli/commands/src/stage/dump/hashing_account.rs` and `crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/stage/dump/hashing_account.rs:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) crates/net/network/src/metrics.rs:395— crates/net/network/src/metrics.rs:395-410 | crates/net/network/src/metrics.rs:464-479 | crates/net/network/src/metrics.rs:533-548 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15–16 lines × 2) crates/engine/tree/src/tree/payload_validator.rs:809— crates/engine/tree/src/tree/payload_validator.rs:809-823 | crates/engine/tree/src/tree/payload_validator.rs:848-863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/engine/tree/src/tree/payload_validator.rs:809` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15–16 lines × 2) crates/prune/prune/src/segments/user/storage_history.rs:159— crates/prune/prune/src/segments/user/storage_history.rs:159-173 | crates/prune/prune/src/segments/user/storage_history.rs:232-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/prune/prune/src/segments/user/storage_history.rs:159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) crates/prune/prune/src/segments/user/account_history.rs:101— crates/prune/prune/src/segments/user/account_history.rs:101-114 | crates/prune/prune/src/segments/user/account_history.rs:183-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–14 lines × 2) crates/prune/prune/src/segments/user/storage_history.rs:102— crates/prune/prune/src/segments/user/storage_history.rs:102-115 | crates/prune/prune/src/segments/user/storage_history.rs:185-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–12 lines × 2) crates/net/downloaders/src/bodies/task.rs:42— crates/net/downloaders/src/bodies/task.rs:42-53 | crates/net/downloaders/src/headers/task.rs:43-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/downloaders/src/bodies/task.rs:42` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) crates/stages/stages/src/stages/hashing_account.rs:187— crates/stages/stages/src/stages/hashing_account.rs:187-198 | crates/stages/stages/src/stages/hashing_storage.rs:117-127 — before extracting anything, compare `crates/stages/stages/src/stages/hashing_account.rs` and `crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/hashing_account.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–8 lines × 2) crates/storage/db-common/src/init.rs:734— crates/storage/db-common/src/init.rs:734-739 | crates/storage/db-common/src/init.rs:828-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/db-common/src/init.rs:734` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–8 lines × 2) crates/trie/sparse/src/arena/mod.rs:794— crates/trie/sparse/src/arena/mod.rs:794-801 | crates/trie/sparse/src/arena/mod.rs:880-885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 3) crates/trie/common/src/hashed_state.rs:1637— crates/trie/common/src/hashed_state.rs:1637-1642 | crates/trie/common/src/hashed_state.rs:1747-1752 | crates/trie/common/src/updates.rs:1461-1466 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `&'a super::HashedPostState` in one and `&'a super::HashedPostStateSorted` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 3) crates/trie/common/src/hashed_state.rs:1646— crates/trie/common/src/hashed_state.rs:1646-1651 | crates/trie/common/src/hashed_state.rs:1756-1761 | crates/trie/common/src/updates.rs:1470-1479 — before extracting anything, compare `crates/trie/common/src/hashed_state.rs` and `crates/trie/common/src/updates.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `HashedPostState<'a>` in one and `HashedPostStateSorted<'a>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
AXR1 · Runtime accessibility (rendered)· WCAG 1.1.1 reproducibly failed in a rendered surface · ×1
WCAG 1.1.1 reproducibly failed in a rendered surface — axe-core rule(s) image-alt failed on: img[height="30"]. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 1.4.3 reproducibly failed in a rendered surface · ×1
WCAG 1.4.3 reproducibly failed in a rendered surface — axe-core rule(s) color-contrast failed on: .cm-placeholder, .m_88bacfd0, .mantine-visible-from-sm > .active[aria-current="page"][href$="query"] > .m_80f1301b.mantine-Button-inner > .m_811560b9.mantine-Button-label, button[data-variant="primary"] > .m_80f1301b.mantine-Button-inner > .m_811560b9.mantine-Button-label. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 4.1.2 reproducibly failed in a rendered surface · ×1
WCAG 4.1.2 reproducibly failed in a rendered surface — axe-core rule(s) aria-allowed-attr, aria-conditional-attr, aria-deprecated-role, aria-hidden-body, aria-hidden-focus, aria-input-field-name, aria-prohibited-attr, aria-required-attr, aria-roles, aria-valid-attr, aria-valid-attr-value, button-name, duplicate-id-aria, link-name, nested-interactive failed on: .cm-content. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
bench-benchmarkoor-summary.main (cyclomatic 47) .github/scripts/bench-benchmarkoor-summary.py:98— bench-benchmarkoor-summary.main has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_transaction_pool::maintain::maintain_transaction_pool (cyclomatic 41) crates/transaction-pool/src/maintain.rs:125— reth_transaction_pool::maintain::maintain_transaction_pool has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_node_ethereum::engine_ssz_proxy::handle_engine_ssz_request (cyclomatic 37) crates/ethereum/node/src/engine_ssz_proxy.rs:563— reth_node_ethereum::engine_ssz_proxy::handle_engine_ssz_request has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthTransactionValidator::validate_stateless (cyclomatic 35) crates/transaction-pool/src/validate/eth.rs:457— EthTransactionValidator::validate_stateless has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProtocolMessage::decode_message_with_tx_memory_budget (cyclomatic 34) crates/net/eth-wire-types/src/message.rs:108— ProtocolMessage::decode_message_with_tx_memory_budget has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_ethereum_payload_builder::default_ethereum_payload (cyclomatic 32) crates/ethereum/payload/src/lib.rs:148— reth_ethereum_payload_builder::default_ethereum_payload has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthStateCacheService::poll (cyclomatic 31) crates/rpc/rpc-eth-types/src/cache/mod.rs:558— EthStateCacheService::poll has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
StreamCodec::decode (cyclomatic 29) crates/rpc/ipc/src/stream_codec.rs:146— StreamCodec::decode has cyclomatic complexity 29 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
TrieWitness::compute (cyclomatic 27) crates/trie/trie/src/witness.rs:88— TrieWitness::compute has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EstimateCall::estimate_gas_with (cyclomatic 25) crates/rpc/rpc-eth-api/src/helpers/estimate.rs:44— EstimateCall::estimate_gas_with has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bench-reth-summary.main (cyclomatic 25) .github/scripts/bench-reth-summary.py:2050— bench-reth-summary.main has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthBeaconConsensus::validate_header (cyclomatic 24) crates/ethereum/consensus/src/lib.rs:168— EthBeaconConsensus::validate_header has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransactionFetcher::on_announcement (cyclomatic 24) crates/net/network/src/transactions/fetcher.rs:196— TransactionFetcher::on_announcement has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IpcConnDriver::poll (cyclomatic 24) crates/rpc/ipc/src/server/connection.rs:90— IpcConnDriver::poll has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExecutionStage::execute (cyclomatic 24) crates/stages/stages/src/stages/execution/mod.rs:293— ExecutionStage::execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inject-cargo-docs.injectCargoDocs (cyclomatic 24) docs/vocs/scripts/inject-cargo-docs.ts:9— inject-cargo-docs.injectCargoDocs has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BasicEngineValidator::validate_block_with_state (cyclomatic 23) crates/engine/tree/src/tree/payload_validator.rs:470— BasicEngineValidator::validate_block_with_state has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
P2PStream::poll_next (cyclomatic 23) crates/net/eth-wire/src/p2pstream.rs:584— P2PStream::poll_next has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthFees::fee_history (cyclomatic 23) crates/rpc/rpc-eth-api/src/helpers/fee.rs:66— EthFees::fee_history has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiveFetcher::download_sequential (cyclomatic 22) crates/cli/commands/src/download/fetch.rs:204— ArchiveFetcher::download_sequential has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RlpxSatelliteStream::poll_next (cyclomatic 22) crates/net/eth-wire/src/multiplex.rs:828— RlpxSatelliteStream::poll_next has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthStatsService::run (cyclomatic 22) crates/node/ethstats/src/ethstats.rs:606— EthStatsService::run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bench-call-summary.build_summary (cyclomatic 22) .github/scripts/bench-call-summary.py:931— bench-call-summary.build_summary has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bench-reth-summary.compute_target_metric_summary (cyclomatic 22) .github/scripts/bench-reth-summary.py:1517— bench-reth-summary.compute_target_metric_summary has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DownloadCommand::resolve_components (cyclomatic 21) crates/cli/commands/src/download/mod.rs:715— DownloadCommand::resolve_components has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_cli_commands::db::tui::handle_event (cyclomatic 21) crates/cli/commands/src/db/tui.rs:198— reth_cli_commands::db::tui::handle_event has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
EngineApiTreeHandler::on_engine_message (cyclomatic 21) crates/engine/tree/src/tree/mod.rs:655— EngineApiTreeHandler::on_engine_message has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReverseHeadersDownloader::poll_next (cyclomatic 21) crates/net/downloaders/src/headers/reverse_headers.rs:831— ReverseHeadersDownloader::poll_next has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Discovery::new (cyclomatic 21) crates/net/network/src/discovery.rs:90— Discovery::new has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PeerResponse::poll (cyclomatic 21) crates/net/network/src/message.rs:211— PeerResponse::poll has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (PeerResponseResult::try_into_message) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
PeerResponseResult::try_into_message (cyclomatic 21) crates/net/network/src/message.rs:292— PeerResponseResult::try_into_message has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (PeerResponse::poll) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
reth_payload_primitives::validate_payload_timestamp (cyclomatic 21) crates/payload/primitives/src/lib.rs:76— reth_payload_primitives::validate_payload_timestamp has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
EthPubSub::handle_accepted (cyclomatic 21) crates/rpc/rpc/src/eth/pubsub.rs:97— EthPubSub::handle_accepted has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
EthBundle::call_bundle (cyclomatic 20) crates/rpc/rpc/src/eth/bundle.rs:59— EthBundle::call_bundle has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EthCall::simulate_v1 (cyclomatic 20) crates/rpc/rpc-eth-api/src/helpers/call.rs:67— EthCall::simulate_v1 has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DecodedMultiProofV2::from_witness_with (cyclomatic 20) crates/trie/common/src/proofs.rs:547— DecodedMultiProofV2::from_witness_with has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineNodeLauncher::launch_node (cyclomatic 19) crates/node/builder/src/launch/engine.rs:84— EngineNodeLauncher::launch_node has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DebugApi::debug_subscribe (cyclomatic 19) crates/rpc/rpc/src/debug.rs:1038— DebugApi::debug_subscribe has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SnapBootstrap::run (cyclomatic 19) crates/snap-sync/src/bootstrap.rs:127— SnapBootstrap::run has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ProofCalculator::next_uncached_key_range (cyclomatic 19) crates/trie/trie/src/proof_v2/calculator.rs:971— ProofCalculator::next_uncached_key_range has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PrewarmCacheTask::transact_worker (cyclomatic 18) crates/engine/tree/src/tree/payload_processor/prewarm.rs:325— PrewarmCacheTask::transact_worker has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PeersManager::poll (cyclomatic 18) crates/net/network/src/peers.rs:1388— PeersManager::poll has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthFilterInner::logs_for_filter (cyclomatic 18) crates/rpc/rpc/src/eth/filter.rs:480— EthFilterInner::logs_for_filter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StorageHashingStage::execute (cyclomatic 18) crates/stages/stages/src/stages/hashing_storage.rs:90— StorageHashingStage::execute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatabaseEnv::open (cyclomatic 18) crates/storage/db/src/implementation/mdbx/mod.rs:453— DatabaseEnv::open has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StateRoot::calculate (cyclomatic 18) crates/trie/trie/src/trie.rs:174— StateRoot::calculate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bench-call-summary.run_stats (cyclomatic 18) .github/scripts/bench-call-summary.py:237— bench-call-summary.run_stats has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bench-call-summary.generate_markdown (cyclomatic 18) .github/scripts/bench-call-summary.py:864— bench-call-summary.generate_markdown has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PrewarmedTx::validate (cyclomatic 17) crates/engine/tree/src/tree/payload_processor/reuse.rs:285— PrewarmedTx::validate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DnsDiscoveryService::poll (cyclomatic 17) crates/net/dns/src/lib.rs:314— DnsDiscoveryService::poll has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LaunchContextWith::create_provider_factory_with_recovery (cyclomatic 17) crates/node/builder/src/launch/common.rs:499— LaunchContextWith::create_provider_factory_with_recovery has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LoadPendingBlock::build_block (cyclomatic 17) crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:275— LoadPendingBlock::build_block has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AccountHashingStage::execute (cyclomatic 17) crates/stages/stages/src/stages/hashing_account.rs:161— AccountHashingStage::execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnvironmentBuilder::open_with_permissions (cyclomatic 17) crates/storage/libmdbx-rs/src/environment.rs:645— EnvironmentBuilder::open_with_permissions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bench-reth-summary.compute_target_metric_change (cyclomatic 17) .github/scripts/bench-reth-summary.py:1005— bench-reth-summary.compute_target_metric_change has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StartingStream::poll_next (cyclomatic 16) crates/era-downloader/src/stream.rs:260— StartingStream::poll_next has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
reth_ethereum_consensus::validation::validate_block_post_execution_with_bal_hashes (cyclomatic 16) crates/ethereum/consensus/src/validation.rs:48— reth_ethereum_consensus::validation::validate_block_post_execution_with_bal_hashes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionManager::poll_pending_session_event (cyclomatic 16) crates/net/network/src/session/mod.rs:589— SessionManager::poll_pending_session_event has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PayloadBuilderService::poll (cyclomatic 16) crates/payload/builder/src/service.rs:406— PayloadBuilderService::poll has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pipeline::unwind_stages (cyclomatic 16) crates/stages/api/src/pipeline/mod.rs:374— Pipeline::unwind_stages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reth_db_common::init::init_genesis_with_settings_and_validate (cyclomatic 16) crates/storage/db-common/src/init.rs:174— reth_db_common::init::init_genesis_with_settings_and_validate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StaticFileProvider::ensure_invariants (cyclomatic 16) crates/storage/provider/src/providers/static_file/manager.rs:1735— StaticFileProvider::ensure_invariants has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OverlayManager::get_or_compute_overlay (cyclomatic 16) crates/storage/storage-overlay/src/manager.rs:551— OverlayManager::get_or_compute_overlay has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ArenaCursor::seek (cyclomatic 16) crates/trie/sparse/src/arena/cursor.rs:363— ArenaCursor::seek has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bench-reth-summary.generate_comparison_table (cyclomatic 16) .github/scripts/bench-reth-summary.py:1733— bench-reth-summary.generate_comparison_table has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FixmeComment crates/stages/api/src/pipeline/mod.rs:698— // FIXME: When handling errors, we do not commit the database transaction. This — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
HackComment crates/evm/evm/src/engine.rs:130— /// HACK: for some reason, this duplicated AT is the only way to enforce the inner Recovered: — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
reth_transaction_pool::maintain::maintain_transaction_pool (cognitive 116) crates/transaction-pool/src/maintain.rs:125— reth_transaction_pool::maintain::maintain_transaction_pool has cognitive complexity 116 (threshold 15). Drivers by points: if/else 25 (85 pts), loops 5 (17 pts), match/switch 4 (9 pts), boolean chains 5 (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-benchmarkoor-summary.main (cognitive 64) .github/scripts/bench-benchmarkoor-summary.py:98— bench-benchmarkoor-summary.main has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 16, ternaries 5 (14 pts), loops 7 (9 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_ethereum_payload_builder::default_ethereum_payload (cognitive 62) crates/ethereum/payload/src/lib.rs:148— reth_ethereum_payload_builder::default_ethereum_payload has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (51 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StreamCodec::decode (cognitive 58) crates/rpc/ipc/src/stream_codec.rs:146— StreamCodec::decode has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 8, match/switch 2 (7 pts), loops 1 (2 pts) (nesting depth added 28). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
IpcConnDriver::poll (cognitive 57) crates/rpc/ipc/src/server/connection.rs:90— IpcConnDriver::poll has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (30 pts), match/switch 5 (18 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthStateCacheService::poll (cognitive 57) crates/rpc/rpc-eth-types/src/cache/mod.rs:558— EthStateCacheService::poll has cognitive complexity 57 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 7 (22 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecodedMultiProofV2::from_witness_with (cognitive 52) crates/trie/common/src/proofs.rs:547— DecodedMultiProofV2::from_witness_with has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (44 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_node_ethereum::engine_ssz_proxy::handle_engine_ssz_request (cognitive 51) crates/ethereum/node/src/engine_ssz_proxy.rs:563— reth_node_ethereum::engine_ssz_proxy::handle_engine_ssz_request has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (38 pts), match/switch 8 (13 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrieWitness::compute (cognitive 51) crates/trie/trie/src/witness.rs:88— TrieWitness::compute has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 8 (13 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-reth-summary.compute_target_metric_summary (cognitive 51) .github/scripts/bench-reth-summary.py:1517— bench-reth-summary.compute_target_metric_summary has cognitive complexity 51 (threshold 15). Drivers by points: loops 12 (32 pts), if/else 8 (18 pts), boolean chains 1 (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
EthStatsService::run (cognitive 48) crates/node/ethstats/src/ethstats.rs:606— EthStatsService::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 4 (13 pts), loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiveFetcher::download_sequential (cognitive 45) crates/cli/commands/src/download/fetch.rs:204— ArchiveFetcher::download_sequential has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkState::poll (cognitive 42) crates/net/network/src/state.rs:522— NetworkState::poll has cognitive complexity 42 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 6 (17 pts), match/switch 2 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoadPendingBlock::build_block (cognitive 41) crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:275— LoadPendingBlock::build_block has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (35 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReverseHeadersDownloader::poll_next (cognitive 39) crates/net/downloaders/src/headers/reverse_headers.rs:831— ReverseHeadersDownloader::poll_next has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 3 (8 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PayloadProcessor::spawn_tx_iterator (cognitive 38) crates/engine/tree/src/tree/payload_processor/mod.rs:263— PayloadProcessor::spawn_tx_iterator has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthFees::fee_history (cognitive 38) crates/rpc/rpc-eth-api/src/helpers/fee.rs:66— EthFees::fee_history has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionStage::execute (cognitive 38) crates/stages/stages/src/stages/execution/mod.rs:293— ExecutionStage::execute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateRoot::calculate (cognitive 38) crates/trie/trie/src/trie.rs:174— StateRoot::calculate has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_rpc::reth::finalized_chain_notifications (cognitive 37) crates/rpc/rpc/src/reth.rs:339— reth_rpc::reth::finalized_chain_notifications has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (28 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
P2PStream::poll_next (cognitive 36) crates/net/eth-wire/src/p2pstream.rs:584— P2PStream::poll_next has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PayloadBuilderService::poll (cognitive 35) crates/payload/builder/src/service.rs:406— PayloadBuilderService::poll has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 3 (11 pts), loops 4 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrewarmedTx::validate (cognitive 34) crates/engine/tree/src/tree/payload_processor/reuse.rs:285— PrewarmedTx::validate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DnsDiscoveryService::poll (cognitive 34) crates/net/dns/src/lib.rs:314— DnsDiscoveryService::poll has cognitive complexity 34 (threshold 15). Drivers by points: loops 9 (19 pts), match/switch 3 (10 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
EngineNodeLauncher::launch_node (cognitive 34) crates/node/builder/src/launch/engine.rs:84— EngineNodeLauncher::launch_node has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthPubSub::handle_accepted (cognitive 34) crates/rpc/rpc/src/eth/pubsub.rs:97— EthPubSub::handle_accepted has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 6 (15 pts), loops 1 (2 pts) (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StorageHashingStage::execute (cognitive 34) crates/stages/stages/src/stages/hashing_storage.rs:90— StorageHashingStage::execute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthBeaconConsensus::validate_header (cognitive 33) crates/ethereum/consensus/src/lib.rs:168— EthBeaconConsensus::validate_header has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FetchFullBlockFuture::poll (cognitive 33) crates/net/p2p/src/full_block.rs:276— FetchFullBlockFuture::poll has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountHashingStage::execute (cognitive 30) crates/stages/stages/src/stages/hashing_account.rs:161— AccountHashingStage::execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EstimateCall::estimate_gas_with (cognitive 29) crates/rpc/rpc-eth-api/src/helpers/estimate.rs:44— EstimateCall::estimate_gas_with has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, match/switch 3 (5 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DownloadCommand::resolve_components (cognitive 28) crates/cli/commands/src/download/mod.rs:715— DownloadCommand::resolve_components has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RlpxProtocolMultiplexer::into_satellite_stream_with_tuple_handshake (cognitive 28) crates/net/eth-wire/src/multiplex.rs:160— RlpxProtocolMultiplexer::into_satellite_stream_with_tuple_handshake has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PoolInner::notify_on_transaction_updates (cognitive 28) crates/transaction-pool/src/pool/mod.rs:941— PoolInner::notify_on_transaction_updates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeArena::sweep_blinded (cognitive 28) crates/trie/sparse/src/arena/node_arena.rs:166— NodeArena::sweep_blinded has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 5 (12 pts), boolean chains 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
bench-reth-summary.main (cognitive 28) .github/scripts/bench-reth-summary.py:2050— bench-reth-summary.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ECIESCodec::decode (cognitive 27) crates/net/ecies/src/codec.rs:65— ECIESCodec::decode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProtocolMessage::decode_message_with_tx_memory_budget (cognitive 27) crates/net/eth-wire-types/src/message.rs:108— ProtocolMessage::decode_message_with_tx_memory_budget has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EthBundle::call_bundle (cognitive 27) crates/rpc/rpc/src/eth/bundle.rs:59— EthBundle::call_bundle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
reth_db_common::init::init_genesis_with_settings_and_validate (cognitive 27) crates/storage/db-common/src/init.rs:174— reth_db_common::init::init_genesis_with_settings_and_validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PendingPool::remove_to_limit (cognitive 27) crates/transaction-pool/src/pool/pending.rs:420— PendingPool::remove_to_limit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReceiptFileClient::from_receipt_reader (cognitive 26) crates/net/downloaders/src/receipt_file_client.rs:60— ReceiptFileClient::from_receipt_reader has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkManager::on_swarm_event (cognitive 26) crates/net/network/src/manager.rs:816— NetworkManager::on_swarm_event has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FetchFullBlockRangeFuture::poll (cognitive 26) crates/net/p2p/src/full_block.rs:879— FetchFullBlockRangeFuture::poll has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RangeBlockMode::next (cognitive 26) crates/rpc/rpc/src/eth/filter.rs:1232— RangeBlockMode::next has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExExNotificationsWithHead::poll_next (cognitive 25) crates/exex/exex/src/notifications.rs:483— ExExNotificationsWithHead::poll_next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Swarm::poll_next (cognitive 25) crates/net/network/src/swarm.rs:328— Swarm::poll_next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LaunchContextWith::create_provider_factory_with_recovery (cognitive 25) crates/node/builder/src/launch/common.rs:499— LaunchContextWith::create_provider_factory_with_recovery has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TraceApi::trace_filter (cognitive 25) crates/rpc/rpc/src/trace.rs:380— TraceApi::trace_filter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadTransactions::start_monitor (cognitive 25) crates/storage/libmdbx-rs/src/txn_manager.rs:278— ReadTransactions::start_monitor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrieNodeIter::try_next (cognitive 25) crates/trie/trie/src/node_iter.rs:201— TrieNodeIter::try_next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-call-summary.build_summary (cognitive 25) .github/scripts/bench-call-summary.py:931— bench-call-summary.build_summary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SessionManager::poll_pending_session_event (cognitive 24) crates/net/network/src/session/mod.rs:589— SessionManager::poll_pending_session_event has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 5 (8 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnvironmentBuilder::open_with_permissions (cognitive 24) crates/storage/libmdbx-rs/src/environment.rs:645— EnvironmentBuilder::open_with_permissions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (3 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CachedPrecompileProvider::execute (cognitive 23) crates/evm/evm/src/precompile_cache.rs:217— CachedPrecompileProvider::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChunkedMultiProofTargetsV2::next (cognitive 23) crates/trie/common/src/target_v2.rs:204— ChunkedMultiProofTargetsV2::next has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BasicBlockDownloader::poll (cognitive 22) crates/engine/tree/src/download.rs:239— BasicBlockDownloader::poll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineHandler::poll (cognitive 22) crates/engine/tree/src/engine.rs:81— EngineHandler::poll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestingApi::build_payload_v1 (cognitive 22) crates/rpc/rpc/src/testing.rs:118— TestingApi::build_payload_v1 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnapBootstrap::run (cognitive 22) crates/snap-sync/src/bootstrap.rs:127— SnapBootstrap::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-call-summary.run_stats (cognitive 22) .github/scripts/bench-call-summary.py:237— bench-call-summary.run_stats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
bench-reth-charts.plot_latency_and_throughput (cognitive 22) .github/scripts/bench-reth-charts.py:54— bench-reth-charts.plot_latency_and_throughput has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inject-cargo-docs.injectCargoDocs (cognitive 22) docs/vocs/scripts/inject-cargo-docs.ts:9— inject-cargo-docs.injectCargoDocs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, ternaries 2 (4 pts), loops 3, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_ethereum_consensus::validation::validate_block_post_execution_with_bal_hashes (cognitive 21) crates/ethereum/consensus/src/validation.rs:48— reth_ethereum_consensus::validation::validate_block_post_execution_with_bal_hashes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExExManager::poll (cognitive 21) crates/exex/exex/src/manager.rs:458— ExExManager::poll has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 5 (6 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BodiesDownloader::poll_next (cognitive 21) crates/net/downloaders/src/bodies/bodies.rs:361— BodiesDownloader::poll_next has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (7 pts), match/switch 2 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransactionLookupStage::execute (cognitive 21) crates/stages/stages/src/stages/tx_lookup.rs:77— TransactionLookupStage::execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseEnv::open (cognitive 21) crates/storage/db/src/implementation/mdbx/mod.rs:453— DatabaseEnv::open has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArenaSparseSubtrie::prune (cognitive 21) crates/trie/sparse/src/arena/mod.rs:242— ArenaSparseSubtrie::prune has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-reth-charts.merge_csvs (cognitive 21) .github/scripts/bench-reth-charts.py:193— bench-reth-charts.merge_csvs has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (7 pts), ternaries 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiveProcessor::run (cognitive 20) crates/cli/commands/src/download/archive.rs:140— ArchiveProcessor::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_network::session::authenticate_stream (cognitive 20) crates/net/network/src/session/mod.rs:1230— reth_network::session::authenticate_stream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 5 (8 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReceiptsByLogs::prune (cognitive 20) crates/prune/prune/src/segments/user/receipts_by_logs.rs:51— ReceiptsByLogs::prune has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reth_prune::segments::user::history::prune_shard (cognitive 20) crates/prune/prune/src/segments/user/history.rs:143— reth_prune::segments::user::history::prune_shard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OverlayManager::get_or_compute_overlay (cognitive 20) crates/storage/storage-overlay/src/manager.rs:551— OverlayManager::get_or_compute_overlay has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
bench-call-summary.generate_markdown (cognitive 20) .github/scripts/bench-call-summary.py:864— bench-call-summary.generate_markdown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 4 (5 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
bench-reth-charts.plot_wait_breakdown (cognitive 20) .github/scripts/bench-reth-charts.py:119— bench-reth-charts.plot_wait_breakdown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::warm_one_batch (cognitive 19) crates/engine/tree/src/tree/txpool_prewarm/worker.rs:183— Worker::warm_one_batch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateFetcher::poll (cognitive 19) crates/net/network/src/fetch/mod.rs:244— StateFetcher::poll has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
reth_node_builder::rpc::prewarm_new_block_bals_task (cognitive 19) crates/node/builder/src/rpc.rs:1727— reth_node_builder::rpc::prewarm_new_block_bals_task has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pruner::prune_segments (cognitive 19) crates/prune/prune/src/pruner.rs:186— Pruner::prune_segments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SegmentHeader::prune (cognitive 19) crates/static-file/types/src/segment.rs:510— SegmentHeader::prune has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
OverlayBuilder::build_state_trie_overlay_at_frontiers (cognitive 19) crates/storage/storage-overlay/src/builder.rs:429— OverlayBuilder::build_state_trie_overlay_at_frontiers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
bench-reth-summary.compute_target_metric_change (cognitive 19) .github/scripts/bench-reth-summary.py:1005— bench-reth-summary.compute_target_metric_change has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MiningMode::poll (cognitive 18) crates/engine/local/src/miner.rs:94— MiningMode::poll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StartingStream::poll_next (cognitive 18) crates/era-downloader/src/stream.rs:260— StartingStream::poll_next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BodiesRequestFuture::poll (cognitive 18) crates/net/downloaders/src/bodies/request.rs:219— BodiesRequestFuture::poll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventHandler::poll (cognitive 18) crates/node/events/src/node.rs:487— EventHandler::poll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StorageWorker::verify_storage (cognitive 18) crates/trie/trie/src/verify/storage.rs:83— StorageWorker::verify_storage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-reth-summary.query_histogram_target_metric_run (cognitive 18) .github/scripts/bench-reth-summary.py:1204— bench-reth-summary.query_histogram_target_metric_run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fetch-grafana-dashboard.make_exportable (cognitive 18) .github/scripts/fetch-grafana-dashboard.py:89— fetch-grafana-dashboard.make_exportable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GetValueViewer::view_dupsort (cognitive 17) crates/cli/commands/src/db/get.rs:580— GetValueViewer::view_dupsort has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineReorg::poll_next (cognitive 17) crates/engine/util/src/reorg.rs:109— EngineReorg::poll_next has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
QueryPool::poll (cognitive 17) crates/net/dns/src/query.rs:81— QueryPool::poll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeState::handle_pipeline_event (cognitive 17) crates/node/events/src/node.rs:90— NodeState::handle_pipeline_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SharedFeed::produce (cognitive 17) crates/rpc/rpc/src/eth/pubsub.rs:511— SharedFeed::produce has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DbTool::list (cognitive 17) crates/storage/db-common/src/db_tool/mod.rs:36— DbTool::list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsistentProvider::get_in_memory_or_storage_by_tx (cognitive 17) crates/storage/provider/src/providers/consistent.rs:325— ConsistentProvider::get_in_memory_or_storage_by_tx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlobTransactions::satisfy_attributes (cognitive 17) crates/transaction-pool/src/pool/blob.rs:107— BlobTransactions::satisfy_attributes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionCache::insert_state (cognitive 16) crates/engine/execution-cache/src/cached_state.rs:1133— ExecutionCache::insert_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PredictedState::update (cognitive 16) crates/engine/tree/src/tree/payload_processor/reuse.rs:602— PredictedState::update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateRangeRequests::poll (cognitive 16) crates/net/network/src/eth_requests.rs:809— StateRangeRequests::poll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateRangeRequest::serve_storage_ranges (cognitive 16) crates/net/network/src/eth_requests.rs:964— StateRangeRequest::serve_storage_ranges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HeaderStage::write_headers (cognitive 16) crates/stages/stages/src/stages/headers.rs:100— HeaderStage::write_headers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-reth-summary.load_target_metric_scrapes (cognitive 16) .github/scripts/bench-reth-summary.py:857— bench-reth-summary.load_target_metric_scrapes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (2 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-reth-summary.generate_comparison_table (cognitive 16) .github/scripts/bench-reth-summary.py:1733— bench-reth-summary.generate_comparison_table has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 7, boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Change coupling clique: noop.rs, test_utils.rs, lib.rs crates/consensus/consensus/src/noop.rs— 3 files — `crates/consensus/consensus/src/noop.rs`, `crates/consensus/consensus/src/test_utils.rs`, `crates/ethereum/consensus/src/lib.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (89 shared lines) crates/storage/provider/src/providers/rocksdb/provider.rs:2392— crates/storage/provider/src/providers/rocksdb/provider.rs:2392-2508 | crates/storage/provider/src/providers/rocksdb/provider.rs:2546-2663 — These two members are variants of one another: 89 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (44 shared lines) crates/stages/stages/src/stages/hashing_account.rs:161— crates/stages/stages/src/stages/hashing_account.rs:161-282 | crates/stages/stages/src/stages/hashing_storage.rs:90-223 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (40 shared lines) crates/rpc/rpc-eth-api/src/helpers/transaction.rs:515— crates/rpc/rpc-eth-api/src/helpers/transaction.rs:515-597 | crates/rpc/rpc-eth-api/src/helpers/transaction.rs:608-686 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (36 shared lines) crates/prune/prune/src/segments/user/account_history.rs:258— crates/prune/prune/src/segments/user/account_history.rs:258-345 | crates/prune/prune/src/segments/user/storage_history.rs:262-352 — These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) crates/trie/common/src/hashed_state.rs:588— crates/trie/common/src/hashed_state.rs:588-654 | crates/trie/common/src/updates.rs:677-743 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (93 corresponding lines) · ×1
Edited copy of a member (93 corresponding lines) crates/stages/stages/src/stages/index_account_history.rs:68— crates/stages/stages/src/stages/index_account_history.rs:68-160 | crates/stages/stages/src/stages/index_storage_history.rs:72-164 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) crates/cli/commands/src/db/get.rs:361— crates/cli/commands/src/db/get.rs:361-419 | crates/cli/commands/src/db/get.rs:431-491 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) crates/cli/commands/src/db/migrate_v2.rs:126— crates/cli/commands/src/db/migrate_v2.rs:126-171 | crates/cli/commands/src/db/migrate_v2.rs:176-225 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 58+ corresponding lines) · ×1
Edited copies of one member (3 members, 58+ corresponding lines) crates/transaction-pool/src/blobstore/disk.rs:79— crates/transaction-pool/src/blobstore/disk.rs:79-143 | crates/transaction-pool/src/blobstore/disk.rs:150-213 | crates/transaction-pool/src/blobstore/disk.rs:307-364 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 58 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) crates/stages/stages/src/stages/utils.rs:251— crates/stages/stages/src/stages/utils.rs:251-302 | crates/stages/stages/src/stages/utils.rs:459-523 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) crates/prune/prune/src/segments/user/account_history.rs:182— crates/prune/prune/src/segments/user/account_history.rs:182-243 | crates/prune/prune/src/segments/user/storage_history.rs:184-247 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) crates/stages/stages/src/stages/utils.rs:127— crates/stages/stages/src/stages/utils.rs:127-173 | crates/stages/stages/src/stages/utils.rs:183-229 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (79 corresponding lines) · ×1
Edited copy of a member (79 corresponding lines) .github/scripts/bench-reth-summary.py:1123— .github/scripts/bench-reth-summary.py:1123-1201 | .github/scripts/bench-reth-summary.py:1211-1295 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) crates/trie/parallel/src/proof_task/mod.rs:547— crates/trie/parallel/src/proof_task/mod.rs:547-597 | crates/trie/parallel/src/proof_task/mod.rs:605-653 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) crates/rpc/rpc/src/validation.rs:495— crates/rpc/rpc/src/validation.rs:495-534 | crates/rpc/rpc/src/validation.rs:540-582 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:301— crates/trie/trie/src/hashed_cursor/post_state.rs:301-339 | crates/trie/trie/src/trie_cursor/in_memory.rs:240-282 | crates/trie/trie/src/trie_cursor/in_memory.rs:287-324 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) crates/cli/commands/src/download/manifest.rs:323— crates/cli/commands/src/download/manifest.rs:323-350 | crates/cli/commands/src/download/manifest.rs:358-388 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) crates/engine/execution-cache/src/cached_state.rs:846— crates/engine/execution-cache/src/cached_state.rs:846-875 | crates/engine/execution-cache/src/cached_state.rs:881-910 | crates/engine/execution-cache/src/cached_state.rs:912-941 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 39+ corresponding lines) · ×1
Edited copies of one member (4 members, 39+ corresponding lines) crates/storage/provider/src/providers/consistent.rs:1146— crates/storage/provider/src/providers/consistent.rs:1146-1191 | crates/storage/provider/src/providers/consistent.rs:1198-1239 | crates/storage/provider/src/providers/consistent.rs:1305-1343 | crates/storage/provider/src/providers/consistent.rs:1349-1388 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) crates/trie/trie/src/hashed_cursor/post_state.rs:347— crates/trie/trie/src/hashed_cursor/post_state.rs:347-379 | crates/trie/trie/src/trie_cursor/in_memory.rs:326-358 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) crates/storage/db/src/implementation/mdbx/cursor.rs:298— crates/storage/db/src/implementation/mdbx/cursor.rs:298-318 | crates/storage/db/src/implementation/mdbx/cursor.rs:320-340 | crates/storage/db/src/implementation/mdbx/cursor.rs:344-364 | crates/storage/db/src/implementation/mdbx/cursor.rs:380-400 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) crates/rpc/rpc-engine-api/src/engine_api.rs:1152— crates/rpc/rpc-engine-api/src/engine_api.rs:1152-1167 | crates/rpc/rpc-engine-api/src/engine_api.rs:1292-1307 | crates/rpc/rpc-engine-api/src/engine_api.rs:1314-1329 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 52+ corresponding lines) · ×1
Edited copies of one member (3 members, 52+ corresponding lines) crates/rpc/rpc/src/eth/builder.rs:86— crates/rpc/rpc/src/eth/builder.rs:86-137 | crates/rpc/rpc/src/eth/builder.rs:190-241 | crates/rpc/rpc/src/eth/builder.rs:247-298 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 52 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) crates/cli/commands/src/stage/dump/hashing_account.rs:83— crates/cli/commands/src/stage/dump/hashing_account.rs:83-105 | crates/cli/commands/src/stage/dump/hashing_storage.rs:78-100 | crates/cli/commands/src/stage/dump/merkle.rs:165-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:1651— crates/storage/provider/src/providers/static_file/writer.rs:1651-1667 | crates/storage/provider/src/providers/static_file/writer.rs:1712-1728 | crates/storage/provider/src/providers/static_file/writer.rs:1735-1751 | crates/storage/provider/src/providers/static_file/writer.rs:1754-1770 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 17+ corresponding lines) · ×1
Edited copies of one member (6 members, 17+ corresponding lines) crates/storage/provider/src/providers/static_file/writer.rs:1260— crates/storage/provider/src/providers/static_file/writer.rs:1260-1279 | crates/storage/provider/src/providers/static_file/writer.rs:1288-1304 | crates/storage/provider/src/providers/static_file/writer.rs:1313-1329 | crates/storage/provider/src/providers/static_file/writer.rs:1378-1394 | crates/storage/provider/src/providers/static_file/writer.rs:1670-1686 | crates/storage/provider/src/providers/static_file/writer.rs:1689-1705 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 12+ corresponding lines) · ×1
Edited copies of one member (6 members, 12+ corresponding lines) crates/storage/rpc-provider/src/lib.rs:388— crates/storage/rpc-provider/src/lib.rs:388-402 | crates/storage/rpc-provider/src/lib.rs:423-438 | crates/storage/rpc-provider/src/lib.rs:483-497 | crates/storage/rpc-provider/src/lib.rs:591-602 | crates/storage/rpc-provider/src/lib.rs:674-686 | crates/storage/rpc-provider/src/lib.rs:698-709 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) crates/storage/provider/src/providers/consistent.rs:632— crates/storage/provider/src/providers/consistent.rs:632-640 | crates/storage/provider/src/providers/consistent.rs:662-670 | crates/storage/provider/src/providers/consistent.rs:676-684 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 7+ corresponding lines) · ×1
Edited copies of one member (5 members, 7+ corresponding lines) crates/storage/provider/src/either_writer.rs:542— crates/storage/provider/src/either_writer.rs:542-549 | crates/storage/provider/src/either_writer.rs:586-594 | crates/storage/provider/src/either_writer.rs:826-832 | crates/storage/provider/src/either_writer.rs:843-849 | crates/storage/provider/src/either_writer.rs:891-897 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 8+ corresponding lines) · ×1
Edited copies of one member (5 members, 8+ corresponding lines) crates/net/network/src/fetch/client.rs:67— crates/net/network/src/fetch/client.rs:67-74 | crates/net/network/src/fetch/client.rs:89-100 | crates/net/network/src/fetch/client.rs:113-124 | crates/net/network/src/fetch/client.rs:131-142 | crates/net/network/src/fetch/client.rs:157-173 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) crates/storage/provider/src/providers/static_file/jar.rs:164— crates/storage/provider/src/providers/static_file/jar.rs:164-175 | crates/storage/provider/src/providers/static_file/jar.rs:219-229 | crates/storage/provider/src/providers/static_file/jar.rs:314-324 | crates/storage/provider/src/providers/static_file/jar.rs:329-339 | crates/storage/provider/src/providers/static_file/jar.rs:376-386 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×1
Edited copies of one member (5 members, 9+ corresponding lines) testing/testing-utils/src/genesis_allocator.rs:71— testing/testing-utils/src/genesis_allocator.rs:71-79 | testing/testing-utils/src/genesis_allocator.rs:88-97 | testing/testing-utils/src/genesis_allocator.rs:106-117 | testing/testing-utils/src/genesis_allocator.rs:126-137 | testing/testing-utils/src/genesis_allocator.rs:142-150 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 10+ corresponding lines) · ×1
Edited copies of one member (5 members, 10+ corresponding lines) crates/era/src/era/types/consensus.rs:178— crates/era/src/era/types/consensus.rs:178-190 | crates/era/src/era/types/consensus.rs:240-252 | crates/era/src/era1/types/execution.rs:134-146 | crates/era/src/era1/types/execution.rs:197-206 | crates/era/src/era1/types/execution.rs:266-276 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) crates/storage/provider/src/either_writer.rs:417— crates/storage/provider/src/either_writer.rs:417-429 | crates/storage/provider/src/either_writer.rs:489-495 | crates/storage/provider/src/either_writer.rs:516-522 | crates/storage/provider/src/either_writer.rs:529-535 | crates/storage/provider/src/either_writer.rs:561-567 | crates/storage/provider/src/either_writer.rs:574-580 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) crates/storage/provider/src/providers/static_file/manager.rs:2709— crates/storage/provider/src/providers/static_file/manager.rs:2709-2719 | crates/storage/provider/src/providers/static_file/manager.rs:2736-2746 | crates/storage/provider/src/providers/static_file/manager.rs:2767-2777 | crates/storage/provider/src/providers/static_file/manager.rs:2798-2808 | crates/storage/provider/src/providers/static_file/manager.rs:2923-2933 | crates/storage/provider/src/providers/static_file/manager.rs:2938-2948 | crates/storage/provider/src/providers/static_file/manager.rs:3007-3017 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) crates/era/src/era/file.rs:270— crates/era/src/era/file.rs:270-284 | crates/era/src/era/file.rs:287-298 | crates/era/src/era/file.rs:301-313 | crates/era/src/era/file.rs:316-328 | crates/era/src/era1/file.rs:366-380 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/1.rs:3— docs/vocs/docs/snippets/sources/exex/hello-world/src/bin/1.rs:3-9 | docs/vocs/docs/snippets/sources/exex/tracking-state/src/bin/1.rs:54-64 | docs/vocs/docs/snippets/sources/exex/tracking-state/src/bin/2.rs:74-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) crates/trie/common/src/hashed_state.rs:460— crates/trie/common/src/hashed_state.rs:460-462 | crates/trie/common/src/target_v2.rs:109-112 | crates/trie/common/src/updates.rs:563-566 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) crates/era/src/era1/types/execution.rs:217— crates/era/src/era1/types/execution.rs:217-220 | crates/era/src/ere/types/execution.rs:146-149 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (42 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2413— crates/storage/provider/src/providers/rocksdb/provider.rs:2413-2454 | crates/storage/provider/src/providers/rocksdb/provider.rs:2567-2608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (35 lines × 2) crates/rpc/rpc/src/eth/builder.rs:207— crates/rpc/rpc/src/eth/builder.rs:207-241 | crates/rpc/rpc/src/eth/builder.rs:264-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/eth/builder.rs:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) crates/storage/provider/src/providers/database/provider.rs:2973— crates/storage/provider/src/providers/database/provider.rs:2973-3006 | crates/storage/provider/src/providers/database/provider.rs:3136-3169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/database/provider.rs:2973` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–33 lines × 2) crates/ethereum/payload/src/lib.rs:271— crates/ethereum/payload/src/lib.rs:271-298 | crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:337-369 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (31–32 lines × 2) crates/rpc/rpc/src/validation.rs:499— crates/rpc/rpc/src/validation.rs:499-530 | crates/rpc/rpc/src/validation.rs:548-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/validation.rs:499` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `BuilderBlockValidationRequestV5` in one and `BuilderBlockValidationRequestV6` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–31 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:2465— crates/storage/provider/src/providers/rocksdb/provider.rs:2465-2494 | crates/storage/provider/src/providers/rocksdb/provider.rs:2619-2649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:2465` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30 lines × 2) crates/storage/libmdbx-rs/src/cursor.rs:564— crates/storage/libmdbx-rs/src/cursor.rs:564-593 | crates/storage/libmdbx-rs/src/cursor.rs:659-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24–27 lines × 2) crates/prune/prune/src/segments/user/storage_history.rs:123— crates/prune/prune/src/segments/user/storage_history.rs:123-146 | crates/prune/prune/src/segments/user/storage_history.rs:273-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21–23 lines × 2) crates/trie/trie/src/trie.rs:240— crates/trie/trie/src/trie.rs:240-260 | crates/trie/trie/src/trie.rs:313-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/trie.rs:240` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–22 lines × 3) crates/transaction-pool/src/blobstore/disk.rs:108— crates/transaction-pool/src/blobstore/disk.rs:108-129 | crates/transaction-pool/src/blobstore/disk.rs:180-198 | crates/transaction-pool/src/blobstore/disk.rs:329-350 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/transaction-pool/src/blobstore/disk.rs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 2) crates/net/peers/src/node_record.rs:186— crates/net/peers/src/node_record.rs:186-206 | crates/net/peers/src/trusted_peer.rs:142-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/peers/src/node_record.rs:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–21 lines × 2) crates/rpc/rpc-eth-api/src/helpers/transaction.rs:555— crates/rpc/rpc-eth-api/src/helpers/transaction.rs:555-569 | crates/rpc/rpc-eth-api/src/helpers/transaction.rs:658-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20–21 lines × 2) crates/stages/stages/src/stages/utils.rs:154— crates/stages/stages/src/stages/utils.rs:154-173 | crates/stages/stages/src/stages/utils.rs:209-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/stages/stages/src/stages/utils.rs:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) crates/trie/trie/src/trie.rs:218— crates/trie/trie/src/trie.rs:218-238 | crates/trie/trie/src/trie.rs:291-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/trie/trie/src/trie.rs:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–20 lines × 2) crates/cli/commands/src/db/account_storage.rs:32— crates/cli/commands/src/db/account_storage.rs:32-49 | crates/cli/commands/src/db/account_storage.rs:63-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/db/account_storage.rs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–20 lines × 2) crates/storage/provider/src/providers/consistent.rs:1168— crates/storage/provider/src/providers/consistent.rs:1168-1187 | crates/storage/provider/src/providers/consistent.rs:1223-1235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/consistent.rs:1168` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 3) docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:28— docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:28-45 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs:26-43 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:28-45 — before extracting anything, compare `docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs` and `docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (43 lines × 2) crates/era/src/era1/types/execution.rs:407— crates/era/src/era1/types/execution.rs:407-449 | crates/era/src/ere/types/execution.rs:475-517 — before extracting anything, compare `crates/era/src/era1/types/execution.rs` and `crates/era/src/ere/types/execution.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/era/src/era1/types/execution.rs:407` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–18 lines × 2) crates/storage/provider/src/providers/consistent.rs:1245— crates/storage/provider/src/providers/consistent.rs:1245-1259 | crates/storage/provider/src/providers/consistent.rs:1394-1411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/consistent.rs:1245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `range` to `impl RangeBounds<BlockNumber>` in one and `impl core::ops::RangeBounds<BlockNumber>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–17 lines × 2) crates/transaction-pool/src/pool/mod.rs:805— crates/transaction-pool/src/pool/mod.rs:805-821 | crates/transaction-pool/src/pool/mod.rs:890-901 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/transaction-pool/src/pool/mod.rs:832` calls `on_new_transaction` and `crates/transaction-pool/src/pool/mod.rs:904` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–16 lines × 2) crates/net/discv4/src/proto.rs:522— crates/net/discv4/src/proto.rs:522-534 | crates/net/discv4/src/proto.rs:602-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/discv4/src/proto.rs:602` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 5) crates/net/discv4/src/proto.rs:296— crates/net/discv4/src/proto.rs:296-309 | crates/net/discv4/src/proto.rs:338-351 | crates/net/discv4/src/proto.rs:381-394 | crates/net/discv4/src/proto.rs:526-537 | crates/net/discv4/src/proto.rs:609-621 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/discv4/src/proto.rs:296` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) crates/engine/tree/src/tree/state_root_strategy/mod.rs:1142— crates/engine/tree/src/tree/state_root_strategy/mod.rs:1142-1153 | crates/engine/tree/src/tree/state_root_strategy/mod.rs:1215-1227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/engine/tree/src/tree/state_root_strategy/mod.rs:1142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 4) docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:30— docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:30-40 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs:38-49 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs:54-65 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:74-85 — before extracting anything, compare `docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs` and `docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/remote/src/exex_1.rs:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) crates/trie/common/src/hashed_state.rs:103— crates/trie/common/src/hashed_state.rs:103-114 | crates/trie/common/src/hashed_state.rs:469-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 4) crates/cli/commands/src/stage/dump/execution.rs:41— crates/cli/commands/src/stage/dump/execution.rs:41-51 | crates/cli/commands/src/stage/dump/hashing_account.rs:36-46 | crates/cli/commands/src/stage/dump/hashing_storage.rs:26-36 | crates/cli/commands/src/stage/dump/merkle.rs:62-72 — before extracting anything, compare `crates/cli/commands/src/stage/dump/hashing_account.rs` and `crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/stage/dump/execution.rs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–11 lines × 4) docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:66— docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:66-76 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_2.rs:32-39 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs:48-55 | docs/vocs/docs/snippets/sources/exex/remote/src/exex_4.rs:68-75 — before extracting anything, compare `docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs` and `docs/vocs/docs/snippets/sources/exex/remote/src/exex_3.rs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (3–11 lines × 4) crates/cli/commands/src/db/stats.rs:204— crates/cli/commands/src/db/stats.rs:204-206 | crates/cli/commands/src/db/stats.rs:305-312 | crates/cli/commands/src/db/stats.rs:368-378 | crates/cli/commands/src/db/stats.rs:396-403 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/db/stats.rs:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 3) crates/rpc/rpc-engine-api/src/engine_api.rs:1174— crates/rpc/rpc-engine-api/src/engine_api.rs:1174-1184 | crates/rpc/rpc-engine-api/src/engine_api.rs:1197-1207 | crates/rpc/rpc-engine-api/src/engine_api.rs:1228-1238 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/rpc/rpc-engine-api/src/engine_api.rs:1211` calls `Ok` and `crates/rpc/rpc-engine-api/src/engine_api.rs:1186` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 2) crates/storage/rpc-provider/src/lib.rs:484— crates/storage/rpc-provider/src/lib.rs:484-494 | crates/storage/rpc-provider/src/lib.rs:699-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) crates/rpc/rpc/src/eth/helpers/signer.rs:33— crates/rpc/rpc/src/eth/helpers/signer.rs:33-41 | crates/rpc/rpc/src/eth/helpers/signer.rs:59-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc/src/eth/helpers/signer.rs:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 4) crates/cli/commands/src/db/stats.rs:123— crates/cli/commands/src/db/stats.rs:123-130 | crates/cli/commands/src/db/stats.rs:193-200 | crates/cli/commands/src/db/stats.rs:382-389 | crates/cli/commands/src/db/stats.rs:431-439 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/cli/commands/src/db/stats.rs:192` calls `is_empty` and `crates/cli/commands/src/db/stats.rs:121` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–9 lines × 5) crates/net/network/src/fetch/mod.rs:400— crates/net/network/src/fetch/mod.rs:400-405 | crates/net/network/src/fetch/mod.rs:431-440 | crates/net/network/src/fetch/mod.rs:453-461 | crates/net/network/src/fetch/mod.rs:477-485 | crates/net/network/src/fetch/mod.rs:513-521 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/net/network/src/fetch/mod.rs:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn on_block_headers_response( &mut` in one and `crate) fn on_block_bodies_response( &mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 3) crates/rpc/rpc-engine-api/src/engine_api.rs:1159— crates/rpc/rpc-engine-api/src/engine_api.rs:1159-1167 | crates/rpc/rpc-engine-api/src/engine_api.rs:1299-1307 | crates/rpc/rpc-engine-api/src/engine_api.rs:1321-1329 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rpc/rpc-engine-api/src/engine_api.rs:1159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 3) crates/storage/provider/src/providers/rocksdb/provider.rs:997— crates/storage/provider/src/providers/rocksdb/provider.rs:997-1003 | crates/storage/provider/src/providers/rocksdb/provider.rs:1748-1756 | crates/storage/provider/src/providers/rocksdb/provider.rs:2807-2814 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:997` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) crates/storage/provider/src/either_writer.rs:467— crates/storage/provider/src/either_writer.rs:467-474 | crates/storage/provider/src/either_writer.rs:499-506 | crates/storage/provider/src/either_writer.rs:598-605 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/either_writer.rs:467` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `StorageShardedKey` in one and `ShardedKey<Address>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 4) crates/cli/commands/src/db/repair_trie.rs:83— crates/cli/commands/src/db/repair_trie.rs:83-89 | crates/cli/commands/src/prune.rs:44-50 | crates/cli/commands/src/stage/run.rs:138-144 | crates/node/builder/src/launch/common.rs:818-824 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/db/repair_trie.rs:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 2) crates/storage/provider/src/providers/rocksdb/provider.rs:1047— crates/storage/provider/src/providers/rocksdb/provider.rs:1047-1052 | crates/storage/provider/src/providers/rocksdb/provider.rs:2834-2840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/providers/rocksdb/provider.rs:1047` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 4) crates/era/src/era1/types/execution.rs:154— crates/era/src/era1/types/execution.rs:154-158 | crates/era/src/era1/types/execution.rs:223-227 | crates/era/src/ere/types/execution.rs:89-93 | crates/era/src/ere/types/execution.rs:152-156 — before extracting anything, compare `crates/era/src/era1/types/execution.rs` and `crates/era/src/ere/types/execution.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 7) crates/node/builder/src/rpc.rs:651— crates/node/builder/src/rpc.rs:651-672 | crates/node/builder/src/rpc.rs:678-699 | crates/node/builder/src/rpc.rs:742-763 | crates/node/builder/src/rpc.rs:772-793 | crates/rpc/rpc-convert/src/transaction.rs:680-701 | crates/rpc/rpc-convert/src/transaction.rs:761-782 | crates/rpc/rpc-convert/src/transaction.rs:788-809 — there are 7 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/node/builder/src/rpc.rs:651` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) crates/cli/commands/src/stage/dump/hashing_account.rs:90— crates/cli/commands/src/stage/dump/hashing_account.rs:90-102 | crates/cli/commands/src/stage/dump/hashing_storage.rs:85-97 | crates/cli/commands/src/stage/dump/merkle.rs:173-185 — before extracting anything, compare `crates/cli/commands/src/stage/dump/hashing_account.rs` and `crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/commands/src/stage/dump/hashing_account.rs:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) crates/e2e-test-utils/src/setup_builder.rs:616— crates/e2e-test-utils/src/setup_builder.rs:616-644 | crates/e2e-test-utils/src/setup_builder.rs:650-685 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) crates/transaction-pool/src/test_utils/mock.rs:302— crates/transaction-pool/src/test_utils/mock.rs:302-316 | crates/transaction-pool/src/test_utils/mock.rs:319-334 | crates/transaction-pool/src/test_utils/mock.rs:337-353 | crates/transaction-pool/src/test_utils/mock.rs:356-373 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (15 lines × 3) crates/storage/provider/src/test_utils/blocks.rs:329— crates/storage/provider/src/test_utils/blocks.rs:329-343 | crates/storage/provider/src/test_utils/blocks.rs:412-426 | crates/storage/provider/src/test_utils/blocks.rs:492-506 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:329` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 4) crates/storage/provider/src/test_utils/blocks.rs:263— crates/storage/provider/src/test_utils/blocks.rs:263-275 | crates/storage/provider/src/test_utils/blocks.rs:326-338 | crates/storage/provider/src/test_utils/blocks.rs:409-421 | crates/storage/provider/src/test_utils/blocks.rs:489-501 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:263` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–11 lines × 4) crates/storage/provider/src/test_utils/blocks.rs:281— crates/storage/provider/src/test_utils/blocks.rs:281-291 | crates/storage/provider/src/test_utils/blocks.rs:340-349 | crates/storage/provider/src/test_utils/blocks.rs:423-432 | crates/storage/provider/src/test_utils/blocks.rs:503-512 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:281` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 5) crates/storage/provider/src/test_utils/blocks.rs:209— crates/storage/provider/src/test_utils/blocks.rs:209-217 | crates/storage/provider/src/test_utils/blocks.rs:263-271 | crates/storage/provider/src/test_utils/blocks.rs:326-334 | crates/storage/provider/src/test_utils/blocks.rs:409-417 | crates/storage/provider/src/test_utils/blocks.rs:489-497 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/storage/provider/src/test_utils/blocks.rs:209` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/storage/provider/src/test_utils/blocks.rs:273` calls `clone`, `extend` and `crates/storage/provider/src/test_utils/blocks.rs:219` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Interpolated log message defeats structured logging crates/trie/trie/src/proof_v2/calculator.rs:1285— `error!` at line 1285 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/maintain.rs:375— `debug!` at line 375 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/maintain.rs:854— `error!` at line 854 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/best.rs:219— `debug!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/listener.rs:293— `debug!` at line 293 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/listener.rs:335— `debug!` at line 335 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/mod.rs:768— `debug!` at line 768 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/mod.rs:871— `debug!` at line 871 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/mod.rs:1363— `debug!` at line 1363 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/mod.rs:1365— `warn!` at line 1365 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/txpool.rs:1306— `trace!` at line 1306 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/pool/txpool.rs:1318— `trace!` at line 1318 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/transaction-pool/src/blobstore/disk.rs:696— `trace!` at line 696 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/tokio-util/src/event_stream.rs:38— `warn!` at line 38 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/tasks/src/runtime.rs:713— `error!` at line 713 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/tasks/src/runtime.rs:782— `error!` at line 782 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/tasks/src/runtime.rs:851— `error!` at line 851 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/tasks/src/runtime.rs:1095— `debug!` at line 1095 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/provider/src/providers/static_file/writer.rs:466— `debug!` at line 466 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/provider/src/providers/static_file/writer.rs:481— `debug!` at line 481 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/db-common/src/db_tool/mod.rs:141— `info!` at line 141 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/db-common/src/db_tool/mod.rs:145— `info!` at line 145 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/db-common/src/db_tool/mod.rs:151— `info!` at line 151 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/db/src/lockfile.rs:79— `warn!` at line 79 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/storage/db/src/implementation/mdbx/mod.rs:515— `warn!` at line 515 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Orphaned file crates/prune/prune/src/limiter.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/e2e-test-utils/src/testsuite/actions/node_ops.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/era-downloader/src/stream.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/e2e-test-utils/src/testsuite/actions/engine_api.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/node/ethstats/src/events.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/rpc/rpc-layer/src/auth_layer.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file testing/testing-utils/src/genesis_allocator.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/rpc/rpc-api/src/anvil.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/ethereum/hardforks/src/display.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/net/discv5/src/metrics.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/cli/util/src/parsers.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/payload/validator/src/cancun.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/payload/util/src/transaction.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/tokio-util/src/event_sender.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/rpc/rpc-api/src/hardhat.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/cli/commands/src/launcher.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/ethereum/node/src/engine.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/engine/tree/src/test_utils.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/net/network/src/session/types.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/net/network-api/src/test_utils/peers_manager.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/tokio-util/src/event_stream.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/node/ethstats/src/connection.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate .github/scripts/bench-call-summary.py:1064— `args.run_pairs is not None and args.run_pairs < 1` appears character-identically in 2 files — .github/scripts/bench-call-summary.py, .github/scripts/bench-reth-summary.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate .github/scripts/bench-reth-summary.py:146— `query.startswith("sum(") and query.endswith(")")` appears character-identically in 2 files — .github/scripts/bench-reth-summary.py, .github/scripts/bench-target-metric-sample-filter.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/stages/stages/src/stages/hashing_account.rs:206— `!channels.is_empty() && channels.len().is_multiple_of(MAXIMUM_CHANNELS)` appears character-identically in 2 files — crates/stages/stages/src/stages/hashing_account.rs, crates/stages/stages/src/stages/hashing_storage.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/trie/trie/src/verify/mod.rs:145— `background.join() && !thread::panicking()` appears character-identically in 2 files — crates/trie/trie/src/verify/mod.rs, crates/trie/trie/src/verify/pipeline.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/stages/stages/src/stages/hashing_account.rs:258— `block_number != last_block && total_entries >= self.commit_entries` appears character-identically in 2 files — crates/stages/stages/src/stages/hashing_account.rs, crates/stages/stages/src/stages/hashing_storage.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/trie/trie/src/hashed_cursor/post_state.rs:638— `control_first.is_none() && test_first.is_none()` appears character-identically in 2 files — crates/trie/trie/src/hashed_cursor/post_state.rs, crates/trie/trie/src/trie_cursor/in_memory.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/trie/trie/src/hashed_cursor/post_state.rs:664— `control_result.is_none() && test_result.is_none()` appears character-identically in 2 files — crates/trie/trie/src/hashed_cursor/post_state.rs, crates/trie/trie/src/trie_cursor/in_memory.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/stages/stages/src/stages/hashing_account.rs:219— `index > 0 && index.is_multiple_of(interval)` appears character-identically in 3 files — crates/stages/stages/src/stages/hashing_account.rs, crates/stages/stages/src/stages/hashing_storage.rs, crates/stages/stages/src/stages/tx_lookup.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/cli/commands/src/db/get.rs:462— `k.address == address && k.sharded_key.key == storage_key` appears character-identically in 2 files — crates/cli/commands/src/db/get.rs, crates/storage/provider/src/providers/rocksdb/provider.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/transaction-pool/src/blobstore/disk.rs:175— `missing_count == 0 && result.iter().all(Option::is_some)` appears character-identically in 2 files — crates/transaction-pool/src/blobstore/disk.rs, crates/transaction-pool/src/blobstore/mem.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/net/downloaders/src/snap/mod.rs:272— `response.accounts.is_empty() && response.proof.is_empty()` appears character-identically in 2 files — crates/net/downloaders/src/snap/mod.rs, crates/net/network/src/fetch/mod.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/stages/stages/src/stages/hashing_account.rs:176— `total_range > self.clean_threshold || from_block == 1` appears character-identically in 2 files — crates/stages/stages/src/stages/hashing_account.rs, crates/stages/stages/src/stages/hashing_storage.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×5
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: crates/ethereum/node/src/snap/mod.rs, crates/era-utils/src/export/mod.rs, crates/net/downloaders/src/snap/bytecode.rs, crates/snap-sync/src/session.rs, crates/era/src/era/file.rs, crates/net/downloaders/src/snap/request.rs, crates/cli/commands/src/export_era.rs, crates/net/downloaders/src/snap/test_utils.rs (+1 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/rpc/rpc/src/validation/blob_cache.rs, crates/e2e-test-utils/src/wait.rs, crates/rpc/rpc-builder/src/rate_limiter.rs, crates/rpc/rpc-api/src/trace.rs, crates/storage/db/src/static_file/cursor.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/trie/trie/src/proof_v2/node.rs, crates/storage/provider/src/providers/database/save_blocks.rs, crates/dst/src/lib.rs. Pair on, review, or document these before any departure.
P10 · Library API & versioning· Implementation type on the public API · ×2
Implementation type on the public API crates/net/ecies/src/error.rs:31— 1 public type in `reth_ecies.error` is marked as implementation by its own namespace, folder or name: `ECIESErrorImpl` (crates/net/ecies/src/error.rs:31, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/storage/db/src/implementation/mdbx/mod.rs:70— 3 public types in `reth_db.implementation.mdbx` are marked as implementation by their own namespace, folder or name: `DatabaseEnvKind` (crates/storage/db/src/implementation/mdbx/mod.rs:70, `implementation`), `DatabaseArguments` (crates/storage/db/src/implementation/mdbx/mod.rs:86, `implementation`), `DatabaseEnv` (crates/storage/db/src/implementation/mdbx/mod.rs:257, `implementation`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (21 single-owned of 828 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 828 of the 1135 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/net/network-api/src/custody.rs, crates/payload/validator/src/amsterdam.rs, crates/storage/db/src/implementation/mdbx/value_prefetch.rs, crates/era-downloader/src/stream.rs.
No ADRs found testing/runner/src/main.rs:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `testing/runner/src/main.rs` makes this repository a deployable product (line 1).
redundant comment docs/vocs/scripts/inject-cargo-docs.ts:32— "Copy all cargo docs to the dist/docs folder" repeats the code it sits on: 4 of its 5 words (copy, cargo, docs, dist) are already in `console.log(`Copying cargo docs to ${VOCS_DIST_PATH}...`);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 119 project(s) overshoot their size bounds, lowering Project Cohesion to 9.8/10. The most over is `crates/transaction-pool` (24835 LoC, 129 module-visible types across 5 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 22 of 828 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 828 of the 1135 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: crates/prune/prune/src/limiter.rs, crates/e2e-test-utils/src/testsuite/actions/node_ops.rs, crates/era-downloader/src/stream.rs, crates/e2e-test-utils/src/testsuite/actions/engine_api.rs, crates/node/ethstats/src/events.rs, crates/rpc/rpc-layer/src/auth_layer.rs, testing/testing-utils/src/genesis_allocator.rs, crates/rpc/rpc-api/src/anvil.rs (and 14 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 74/75 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling· Dependabot does not watch bun/cargo · ×1
Dependabot does not watch bun/cargo .github/dependabot.yml:2— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `bun`, `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
No app-layer HTTPS enforcement detected — This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `Server::builder()` (docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:69).
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `Server::builder()` (docs/vocs/docs/snippets/sources/exex/remote/src/exex.rs:69).
Silent fallback default on Err crates/storage/provider/src/providers/rocksdb/provider.rs:692— `wal_size_bytes` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Outdated: alloy-eip7928 — `alloy-eip7928` is locked at 0.4.11 but 0.4.13 is the current stable release on crates.io, and it already satisfies the `"0.4.10"` requirement declared in crates/snap-sync/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p alloy-eip7928` and commit the updated REDACTED.
Outdated: alloy-rlp — `alloy-rlp` is locked at 0.3.16 but 0.3.17 is the current stable release on crates.io, and it already satisfies the `"0.3.16"` requirement declared in crates/e2e-test-utils/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p alloy-rlp` and commit the updated REDACTED.
Outdated: arbitrary — `arbitrary` is locked at 1.4.2 but 1.5.0 is the current stable release on crates.io, and it already satisfies the `"1.3"` requirement declared in crates/cli/commands/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arbitrary` and commit the updated REDACTED.
Outdated: async-compression — `async-compression` is locked at 0.4.48 but 0.4.52 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/net/downloaders/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-compression` and commit the updated REDACTED.
Outdated: auto_impl — `auto_impl` is locked at 1.3.0 but 1.4.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/chainspec/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p auto_impl` and commit the updated REDACTED.
Outdated: cc — `cc` is locked at 1.5.1 but 1.11.2 is the current stable release on crates.io, and it already satisfies the `"1.2.62"` requirement declared in crates/storage/libmdbx-rs/mdbx-sys/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
Outdated: either — `either` is locked at 1.18.0 but 1.19.0 is the current stable release on crates.io, and it already satisfies the `"1.16.0"` requirement declared in crates/payload/primitives/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p either` and commit the updated REDACTED.
Outdated: fixed-cache — `fixed-cache` is locked at 0.1.10 but 0.1.11 is the current stable release on crates.io, and it already satisfies the `"0.1.10"` requirement declared in crates/engine/execution-cache/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fixed-cache` and commit the updated REDACTED.
Outdated: fixed-map — `fixed-map` is locked at 0.9.5 but 0.9.6 is the current stable release on crates.io, and it already satisfies the `"0.9"` requirement declared in crates/static-file/types/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fixed-map` and commit the updated REDACTED.
Outdated: hyper — `hyper` is locked at 1.11.1 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1.9"` requirement declared in crates/rpc/jsonrpsee/server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hyper` and commit the updated REDACTED.
Outdated: interprocess — `interprocess` is locked at 2.4.4 but 2.4.8 is the current stable release on crates.io, and it already satisfies the `"2.4.2"` requirement declared in crates/rpc/ipc/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p interprocess` and commit the updated REDACTED.
Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/metrics/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: memmap2 — `memmap2` is locked at 0.9.11 but 0.9.12 is the current stable release on crates.io, and it already satisfies the `"0.9.11"` requirement declared in crates/storage/nippy-jar/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p memmap2` and commit the updated REDACTED.
Outdated: notify — `notify` is locked at 8.2.0 but 8.2.2 is the current stable release on crates.io, and it already satisfies the `"8.0.0"` requirement declared in crates/storage/provider/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify` and commit the updated REDACTED.
Outdated: nybbles — `nybbles` is locked at 0.4.8 but 0.4.9 is the current stable release on crates.io, and it already satisfies the `"0.4.8"` requirement declared in crates/evm/execution-errors/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p nybbles` and commit the updated REDACTED.
Outdated: proptest — `proptest` is locked at 1.11.0 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1.7"` requirement declared in crates/transaction-pool/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p proptest` and commit the updated REDACTED.
Outdated: prost — `prost` is locked at 0.14.4 but 0.14.6 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in crates/tracing-otlp/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p prost` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in crates/chainspec/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: smallvec — `smallvec` is locked at 1.16.2 but 1.16.5 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/transaction-pool/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.53.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.52.3"` requirement declared in crates/chain-state/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: tokio-util — `tokio-util` is locked at 0.7.19 but 0.7.20 is the current stable release on crates.io, and it already satisfies the `"0.7.11"` requirement declared in crates/metrics/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio-util` and commit the updated REDACTED.
Outdated: zstd — `zstd` is locked at 0.14.3 but 0.14.4 is the current stable release on crates.io, and it already satisfies the `"0.14.3"` requirement declared in crates/cli/commands/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zstd` and commit the updated REDACTED.
Off the main sequence: reth-ethereum-primitives — reth-ethereum-primitives: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: reth-trie-common — reth-trie-common: abstractness 0.03, instability 0.00, distance 0.97 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: reth-payload-builder-primitives — reth-payload-builder-primitives: abstractness 0.00, instability 0.14, distance 0.86 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1db5c-3e5b-7b4a-af23-e718b5217cfc · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 31 · Warnings: 1307 · Recommendations: 104 · Info: 25 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 18:40 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.