Public report of LayerZero-Labs/qmdb, published 17 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, 17 November 2026, 08:00 UTC · Survey ID cd_955e14e4031e41d1b3419eb5e675ac9a
LayerZero-Labs/qmdb
Measured 17 November 2026, 07:58 UTC, at code version 9d00cf7
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreAt risk
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: 283,835 lines of product code in 125 projects, tests not counted · Estimated rebuild effort: about 2.0 person-years · Weakest lens: Production Readiness, 39.9
Findings by how serious they are
30 critical1277 serious118 minor
7 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
17 November 2026, 07:58 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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.
1308of 1425 findings point to an exact file and line, so you can open each one in the code. The other 117 concern the repository as a whole, such as missing documentation.
57dimensions across 7 lenses, read from 283,835 lines of product code in 125 projects.
LayerZero-Labs/qmdb is rated At risk because critical security findings are open. It scores 59.4 out of 100, which the At risk rating leaves unchanged. We judged it as a template or a sample, against a lower bar.
Production Readiness, at 39.9, is the weakest lens and counts most in the score. The best first step is replacing the three packages under a banned licence, worth about 16.7 points. Planning backups and recovery would lift Production Readiness itself, worth about 7.3 points. Raising Production Readiness to 52 would lift the score to about 64.9.
Twelve known security holes in the packages the code depends on can be used by attackers. Eight settings leave the servers or containers unsafe, and four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, correcting the unsafe settings and pinning each tool to an exact version would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the two pipeline steps that run downloads without checking them need each download checked against a known checksum first. The three packages under a licence on your banned list need replacing, or clearing with your legal team.
The product code is 283,835 lines, about €290,000 to rebuild.
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 39.9 to 52, the lowest score rated Strong, the score would rise from 59.4 to about 64.9.
Code composition: what the lines of code are
Product code 95%Tests 5%
Rebuild cost: about €290,000 · Estimate
Cost to rebuild
€96,000 to €480,000, for 1,594 to 5,058 hours of work, about 2.0 person-years for 1 to 4 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 59. 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: 283,835 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 3 Banned license finding(s) in License Compliance.
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 €290,000 to build again, about 2.0 person-years of work. Its weakest lens is Production Readiness, at 39.9 (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 3 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 16.7 points for low effort, because it clears the 3 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.
992 modules, with 2426 dependencies between them. 23 loops run through 88 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 952 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.
Uses a module listed above itPart of a loopThe module itself
9→19 nomt.io.page_pool uses nomt.beatreepart of a loop✕
Connections
2 pairs of types, where a type in nomt.io.page_pool uses a type in nomt.beatree.
The types involved
nomt.io.page_pool.Page → nomt.beatree.Sync
nomt.io.page_pool.PagePool → nomt.beatree.Sync
Direction
nomt.io.page_pool uses nomt.beatree, so a change to nomt.beatree can break nomt.io.page_pool, while a change to nomt.io.page_pool can't break nomt.beatree.
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_primitives.receipt uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_primitives.receipt, while a change to reth_primitives.receipt can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_primitives.receipt uses a module listed above it, which is the healthy direction.
reth_primitives_traits.header.sealed uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_primitives_traits.header.sealed, while a change to reth_primitives_traits.header.sealed can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_primitives_traits.header.sealed uses a module listed above it, which is the healthy direction.
reth_prune_types.target uses reth_prune_types.mode, so a change to reth_prune_types.mode can break reth_prune_types.target, while a change to reth_prune_types.target can't break reth_prune_types.mode.
Position
Below the diagonal: reth_prune_types.target uses a module listed above it, which is the healthy direction.
nomt.beatree.allocator uses nomt.io.page_pool, so a change to nomt.io.page_pool can break nomt.beatree.allocator, while a change to nomt.beatree.allocator can't break nomt.io.page_pool.
Position
Below the diagonal: nomt.beatree.allocator uses a module listed above it, which is the healthy direction.
nomt.page_cache uses nomt.io.page_pool, so a change to nomt.io.page_pool can break nomt.page_cache, while a change to nomt.page_cache can't break nomt.io.page_pool.
Position
Below the diagonal: nomt.page_cache uses a module listed above it, which is the healthy direction.
14→20 nomt.page_cache uses nomt.merklepart of a loop✕
Connections
3 pairs of types, where a type in nomt.page_cache uses a type in nomt.merkle.
reth_chainspec.spec uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_chainspec.spec, while a change to reth_chainspec.spec can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_chainspec.spec 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_chainspec.spec uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_chainspec.spec, while a change to reth_chainspec.spec can't break reth_primitives_traits.header.sealed.
Position
Below the diagonal: reth_chainspec.spec uses a module listed above it, which is the healthy direction.
reth_config.config uses reth_prune_types.target, so a change to reth_prune_types.target can break reth_config.config, while a change to reth_config.config can't break reth_prune_types.target.
Position
Below the diagonal: reth_config.config uses a module listed above it, which is the healthy direction.
reth_execution_types.execution_outcome uses reth_trie.state, so a change to reth_trie.state can break reth_execution_types.execution_outcome, while a change to reth_execution_types.execution_outcome can't break reth_trie.state.
Position
Below the diagonal: reth_execution_types.execution_outcome uses a module listed above it, which is the healthy direction.
reth_execution_types.execution_outcome uses reth_primitives.receipt, so a change to reth_primitives.receipt can break reth_execution_types.execution_outcome, while a change to reth_execution_types.execution_outcome can't break reth_primitives.receipt.
Position
Below the diagonal: reth_execution_types.execution_outcome uses a module listed above it, which is the healthy direction.
reth_primitives.block uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_primitives.block, while a change to reth_primitives.block can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_primitives.block uses a module listed above it, which is the healthy direction.
reth_primitives.block uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_primitives.block, while a change to reth_primitives.block can't break reth_primitives.transaction.
Position
Below the diagonal: reth_primitives.block uses a module listed above it, which is the healthy direction.
reth_primitives.block uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_primitives.block, while a change to reth_primitives.block can't break reth_primitives_traits.header.sealed.
Position
Below the diagonal: reth_primitives.block uses a module listed above it, which is the healthy direction.
nomt.beatree uses nomt.io.page_pool, so a change to nomt.io.page_pool can break nomt.beatree, while a change to nomt.beatree can't break nomt.io.page_pool.
Position
Below the diagonal: nomt.beatree uses a module listed above it, which is the healthy direction.
nomt.beatree uses nomt.beatree.allocator, so a change to nomt.beatree.allocator can break nomt.beatree, while a change to nomt.beatree can't break nomt.beatree.allocator.
Position
Below the diagonal: nomt.beatree uses a module listed above it, which is the healthy direction.
nomt.merkle uses nomt.io.page_pool, so a change to nomt.io.page_pool can break nomt.merkle, while a change to nomt.merkle can't break nomt.io.page_pool.
Position
Below the diagonal: nomt.merkle uses a module listed above it, which is the healthy direction.
nomt.merkle uses nomt.beatree.allocator, so a change to nomt.beatree.allocator can break nomt.merkle, while a change to nomt.merkle can't break nomt.beatree.allocator.
Position
Below the diagonal: nomt.merkle uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_primitives.transaction.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_trie.state, so a change to reth_trie.state can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_trie.state.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_primitives.receipt, so a change to reth_primitives.receipt can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_primitives.receipt.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_primitives_traits.header.sealed.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_execution_types.execution_outcome.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_chain_state.in_memory uses reth_primitives.block, so a change to reth_primitives.block can break reth_chain_state.in_memory, while a change to reth_chain_state.in_memory can't break reth_primitives.block.
Position
Below the diagonal: reth_chain_state.in_memory uses a module listed above it, which is the healthy direction.
reth_node_core.node_config uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_node_core.node_config, while a change to reth_node_core.node_config can't break reth_primitives_traits.header.sealed.
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_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_provider.providers.database uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_codecs.alloy.header.
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_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_prune_types.target, so a change to reth_prune_types.target can break reth_provider.providers.database, while a change to reth_provider.providers.database can't break reth_prune_types.target.
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_storage_api.state uses reth_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_storage_api.state, while a change to reth_storage_api.state can't break reth_execution_types.execution_outcome.
Position
Below the diagonal: reth_storage_api.state uses a module listed above it, which is the healthy direction.
reth_transaction_pool.traits uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_transaction_pool.traits, while a change to reth_transaction_pool.traits can't break reth_primitives.transaction.
Position
Below the diagonal: reth_transaction_pool.traits uses a module listed above it, which is the healthy direction.
reth_transaction_pool.traits uses reth_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_transaction_pool.traits, while a change to reth_transaction_pool.traits can't break reth_execution_types.execution_outcome.
Position
Below the diagonal: reth_transaction_pool.traits uses a module listed above it, which is the healthy direction.
reth_transaction_pool.traits uses reth_primitives.block, so a change to reth_primitives.block can break reth_transaction_pool.traits, while a change to reth_transaction_pool.traits can't break reth_primitives.block.
Position
Below the diagonal: reth_transaction_pool.traits 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_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_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_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_engine_tree.tree uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_codecs.alloy.header.
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_trie.state, so a change to reth_trie.state can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_trie.state.
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_primitives.block, so a change to reth_primitives.block can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_primitives.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_chain_state.in_memory, so a change to reth_chain_state.in_memory can break reth_engine_tree.tree, while a change to reth_engine_tree.tree can't break reth_chain_state.in_memory.
Position
Below the diagonal: reth_engine_tree.tree 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_prune_types.target, so a change to reth_prune_types.target can break reth_node_builder.launch.common, while a change to reth_node_builder.launch.common can't break reth_prune_types.target.
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_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_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.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_provider.providers uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_provider.providers, while a change to reth_provider.providers can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_provider.providers.static_file.manager, so a change to reth_provider.providers.static_file.manager can break reth_provider.providers, while a change to reth_provider.providers can't break reth_provider.providers.static_file.manager.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_stages_types.id, so a change to reth_stages_types.id can break reth_provider.providers, while a change to reth_provider.providers can't break reth_stages_types.id.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_primitives.receipt, so a change to reth_primitives.receipt can break reth_provider.providers, while a change to reth_provider.providers can't break reth_primitives.receipt.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_provider.providers, while a change to reth_provider.providers can't break reth_primitives_traits.header.sealed.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_chainspec.spec, so a change to reth_chainspec.spec can break reth_provider.providers, while a change to reth_provider.providers can't break reth_chainspec.spec.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_primitives.block, so a change to reth_primitives.block can break reth_provider.providers, while a change to reth_provider.providers can't break reth_primitives.block.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_provider.providers.database, so a change to reth_provider.providers.database can break reth_provider.providers, while a change to reth_provider.providers can't break reth_provider.providers.database.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers uses reth_storage_api.state, so a change to reth_storage_api.state can break reth_provider.providers, while a change to reth_provider.providers can't break reth_storage_api.state.
Position
Below the diagonal: reth_provider.providers uses a module listed above it, which is the healthy direction.
reth_provider.providers.blockchain_provider uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_codecs.alloy.header.
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_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_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_primitives_traits.header.sealed.
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_chain_state.in_memory, so a change to reth_chain_state.in_memory can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_chain_state.in_memory.
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.blockchain_provider uses reth_storage_api.state, so a change to reth_storage_api.state can break reth_provider.providers.blockchain_provider, while a change to reth_provider.providers.blockchain_provider can't break reth_storage_api.state.
Position
Below the diagonal: reth_provider.providers.blockchain_provider uses a module listed above it, which is the healthy direction.
reth_provider.providers.database.provider uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_codecs.alloy.header.
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_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_trie.state, so a change to reth_trie.state can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_trie.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_prune_types.target, so a change to reth_prune_types.target can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_prune_types.target.
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_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_execution_types.execution_outcome.
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_primitives.block, so a change to reth_primitives.block can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_primitives.block.
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_api.state, so a change to reth_storage_api.state can break reth_provider.providers.database.provider, while a change to reth_provider.providers.database.provider can't break reth_storage_api.state.
Position
Below the diagonal: reth_provider.providers.database.provider uses a module listed above it, which is the healthy direction.
reth_transaction_pool uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_transaction_pool, while a change to reth_transaction_pool can't break reth_primitives.transaction.
Position
Below the diagonal: reth_transaction_pool uses a module listed above it, which is the healthy direction.
reth_transaction_pool uses reth_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_transaction_pool, while a change to reth_transaction_pool can't break reth_execution_types.execution_outcome.
Position
Below the diagonal: reth_transaction_pool 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_beacon_consensus.engine uses reth_codecs.alloy.header, so a change to reth_codecs.alloy.header can break reth_beacon_consensus.engine, while a change to reth_beacon_consensus.engine can't break reth_codecs.alloy.header.
Position
Below the diagonal: reth_beacon_consensus.engine uses a module listed above it, which is the healthy direction.
reth_beacon_consensus.engine uses reth_primitives_traits.header.sealed, so a change to reth_primitives_traits.header.sealed can break reth_beacon_consensus.engine, while a change to reth_beacon_consensus.engine can't break reth_primitives_traits.header.sealed.
Position
Below the diagonal: reth_beacon_consensus.engine uses a module listed above it, which is the healthy direction.
reth_beacon_consensus.engine uses reth_primitives.block, so a change to reth_primitives.block can break reth_beacon_consensus.engine, while a change to reth_beacon_consensus.engine can't break reth_primitives.block.
Position
Below the diagonal: reth_beacon_consensus.engine uses a module listed above it, which is the healthy direction.
reth_beacon_consensus.engine uses reth_provider.providers, so a change to reth_provider.providers can break reth_beacon_consensus.engine, while a change to reth_beacon_consensus.engine can't break reth_provider.providers.
Position
Below the diagonal: reth_beacon_consensus.engine uses a module listed above it, which is the healthy direction.
reth_network.transactions uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_network.transactions, while a change to reth_network.transactions can't break reth_primitives.transaction.
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.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.
34→37 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_optimism_rpc.eth uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_optimism_rpc.eth, while a change to reth_optimism_rpc.eth can't break reth_primitives.transaction.
Position
Below the diagonal: reth_optimism_rpc.eth uses a module listed above it, which is the healthy direction.
reth_optimism_rpc.eth uses reth_primitives.receipt, so a change to reth_primitives.receipt can break reth_optimism_rpc.eth, while a change to reth_optimism_rpc.eth can't break reth_primitives.receipt.
Position
Below the diagonal: reth_optimism_rpc.eth uses a module listed above it, which is the healthy direction.
reth_optimism_rpc.eth uses reth_execution_types.execution_outcome, so a change to reth_execution_types.execution_outcome can break reth_optimism_rpc.eth, while a change to reth_optimism_rpc.eth can't break reth_execution_types.execution_outcome.
Position
Below the diagonal: reth_optimism_rpc.eth uses a module listed above it, which is the healthy direction.
reth_optimism_rpc.eth uses reth_transaction_pool, so a change to reth_transaction_pool can break reth_optimism_rpc.eth, while a change to reth_optimism_rpc.eth can't break reth_transaction_pool.
Position
Below the diagonal: reth_optimism_rpc.eth uses a module listed above it, which is the healthy direction.
reth_rpc.eth.core uses reth_primitives.transaction, so a change to reth_primitives.transaction can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_primitives.transaction.
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_primitives.receipt, so a change to reth_primitives.receipt can break reth_rpc.eth.core, while a change to reth_rpc.eth.core can't break reth_primitives.receipt.
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_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_primitives.transaction, so a change to reth_primitives.transaction can break reth_network.network, while a change to reth_network.network can't break reth_primitives.transaction.
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_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_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_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_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_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.
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_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.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_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_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_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.
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
A03:2025 — Software Supply Chain Failures
157
High / Critical
A02:2025 — Security Misconfiguration
15
High / Critical
A05:2025 — Injection
8
High / Critical
Roadmap
Top priorities: Resolve the 3 Banned license finding(s) in License Compliance; Resolve the 1 finding(s) in DR & Backup; Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Banned license finding(s) in License Compliance.
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 — 30
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 — 1277
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 — 118
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
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.7, 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, 1308 of 1425 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, 449 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.
D13 Secret Scanning — 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. Secret Scanning couldn't be assessed within its 5-minute budget on a solution this large — not included in this run.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 26 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits for a meaningful bus factor (26 commit(s) sampled, fewer than the 50 this dimension needs before a bus factor means anything).
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. 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 per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): 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 — 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. 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.
D34 Knowledge Freshness — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits to judge knowledge freshness (26 commit(s) sampled).
D35 Change Coupling — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 26 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
AX6 Interface segregation — 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
X17 Uncapped recursion over a caller-supplied document — 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. 11 further occurrence(s) are not listed individually; the score already reflects all 51.
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. 76 further occurrence(s) are not listed individually; the score already reflects all 116.
X5 Nullable reference types — 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. 887 further occurrence(s) are not listed individually; the score already reflects all 927.
Repo exclusion declarations: 25 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.
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.
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.
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.
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.
41 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was AdminApi::node_info at 69. 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 32 — they are counted neither in the figure above nor in this dimension's score. 7 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: reth/crates/storage/libmdbx-rs/src/error.rs (Error::to_err_code at 32), reth/crates/rpc/rpc-eth-types/src/error.rs (RpcInvalidTransactionError::from at 24), reth/crates/storage/provider/src/providers/database/metrics.rs (DatabaseProviderMetrics::record_duration at 22), reth/crates/ethereum-forks/src/hardfork/ethereum.rs (EthereumHardfork::from_str at 19), reth/crates/net/eth-wire-types/src/message.rs (ProtocolMessage::decode_message at 18), and 2 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.
+ 25 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with AdminApi::node_info (cyclomatic 69), EthTransactionValidatorInner::validate_one (cyclomatic 41), ActiveSession::on_incoming_message (cyclomatic 36). — 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 4 together lifts Cyclomatic Complexity from 6.4 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.
+ 98 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with RlpxSatelliteStream::poll_next (cognitive 73), EthStateCacheService::poll (cognitive 71), ActiveSession::poll (cognitive 69). — 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 3 together lifts Cognitive Complexity from 6.3 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 Classes9.2 / 10Stronggated by 88 serious findings✓ 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 28 FileTooLong finding(s) in God Classes — start with mod.rs (7), lib.rs (4), manager.rs (2). — One of this dimension's main actionable groups (28 warning-level).
Resolve the 20 ClassTooLong finding(s) in God Classes — start with mod.rs (5), manager.rs (2), lib.rs (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 19 MethodTooLong finding(s) in God Classes — start with mod.rs (6), engine.rs, manager.rs. — One of this dimension's main actionable groups (19 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.
240 duplicated block group(s) detected. 4.3 % of the production lines (12,092 of 283,835) are in a reported copy. A further 224 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 47 of the 464 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.
+ 158 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 26 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), blockchain_provider.rs (2), lib.rs (2). — One of this dimension's main actionable groups (26 warning-level).
Resolve the 18 Edited copy of a member (10 corresponding lines) finding(s) in Code Duplication — start with mod.rs (2), mock.rs (2), otterscan.rs. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 17 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), config.rs (2), blockchain_provider.rs (2). — One of this dimension's main actionable groups (17 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.0 / 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.
125 production modules (Cargo), 0 dependency cycle(s), 18 unstable depended-on module(s). Read from the build's own module declarations; 28 module(s) off the main sequence, with abstractness counted on 113 of the 125 (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-ipc · ×24
Unstable project reth-auto-seal-consensus
Unstable project reth-blockchain-tree
Unstable project reth-cli-commands
Unstable project reth-db-common
+ 15 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 24 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (24 warning-level).
Resolve the 1 Unstable project reth-auto-seal-consensus finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project reth-blockchain-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 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with config.rs, mock.rs, stream.rs. — One of this dimension's main actionable groups (5 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.
48 outdated, 0 yanked direct Cargo dependencies. 80 of 223 direct crates were graded against crates.io (0 not published there, 143 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: anyhow · ×48
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
3 of 466 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 11 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, which is its own choice and is not judged here.
Banned license: kvdb · ×3
What to do
Resolve the 3 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (3 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.
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.
170 deducted task-comment markers across 283835 LoC (0.1/KLoC) → score 9.9. 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 162 TodoComment finding(s) in Explicit Debt — start with mod.rs (19), lib.rs (13), blockchain_provider.rs (7). — One of this dimension's main actionable groups (162 warning-level).
Resolve the 6 HackComment finding(s) in Explicit Debt — start with block.rs (3), db.rs (2), iterator.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with mod.rs, pbt.rs. — One of this dimension's main actionable groups (2 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.
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).
8 finding(s): 0 critical, 7 high, 1 medium, 0 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 7 file(s) — `reth/book/cli/help.rs` (line 1, line 4, line 7, …), `reth/crates/cli/commands/src/import.rs` (line 59), `reth/crates/cli/commands/src/node.rs` (line 133), `reth/crates/prune/prune/src/segments/user/history.rs` (line 34), `reth/crates/rpc/rpc-builder/src/lib.rs` (line 845, line 912), … (+2 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 8 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
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
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.
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
Resolve the 3 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 2 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 8 High IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (8 issue-level).
Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 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.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with rust-toolchain.toml. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
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 isolation10.0 / 10Exemplary✓ 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.
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.
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.
Other · Code Health — Unreviewed-generation residue in this repository's Rust: functions whose whole body is still `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
`subscribe_peer_events`'s whole body panics or returns an error whose message says it isn't finished — generated scaffolding that was never completed. Implement it or remove it. — reth/crates/rpc/rpc/src/admin.rs:182
`from_compact` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. (×2) — reth/crates/storage/codecs/src/lib.rs:89, reth/crates/storage/codecs/src/lib.rs:226
`specialized_from_compact` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. — reth/crates/storage/codecs/src/lib.rs:244
`canonical_hashes_range` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. — reth/crates/storage/provider/src/providers/bundle_state_provider.rs:63
`state_root_from_nodes` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. — reth/crates/storage/provider/src/providers/bundle_state_provider.rs:94
What to do
Finish or delete the functions that are still `todo!()`/`unimplemented!()` or panic "not implemented", and replace placeholder text before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Rust: functions whose body is `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, match arms and branches left as `todo!()`, functions that take inputs and return a constant (`Ok(())`, `None`, `Default::default()`, an empty `Vec`) or do nothing, and impls most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`note_read` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — nomt/benchtop/src/sp_trie.rs:129
`tentative_preserve_prior` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — nomt/nomt/src/rollback/mod.rs:398
`print_flag` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — nomt/torture/src/supervisor/mod.rs:209
`call_new_payload` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/bin/reth-bench/src/valid_payload.rs:219
`call_forkchoice_updated` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/bin/reth-bench/src/valid_payload.rs:264
`execute` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — reth/crates/cli/commands/src/dump_genesis.rs:26
`send_to_service` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/discv4/src/lib.rs:395
`insert_unsigned_boot_node` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/discv5/src/config.rs:318
`try_into_reachable` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/crates/net/discv5/src/lib.rs:351
`sync_tree_with_link` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/dns/src/lib.rs:76
`set_download_range` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — reth/crates/net/downloaders/src/bodies/task.rs:90
`update_sync_gap` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/downloaders/src/headers/task.rs:85
`update_local_head` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/downloaders/src/headers/task.rs:89
`update_sync_target` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/downloaders/src/headers/task.rs:93
`set_batch_size` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/downloaders/src/headers/task.rs:97
`send_raw` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/eth-wire/src/multiplex.rs:646
`send_err_response` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/network-api/src/events.rs:158
`send_message` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/network/src/network.rs:105
`send` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/net/network/src/transactions/mod.rs:95
`invalid_block_hook` does real work, but one of its branches is `bail!` with a "not implemented" message — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/crates/node/builder/src/launch/common.rs:910
`subscribe_peer_events`'s whole body panics or returns an error whose message says it isn't finished — a not-implemented stub in ordinary clothes. Implement it or remove it. — reth/crates/rpc/rpc/src/admin.rs:182
`set_tip` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/stages/api/src/pipeline/mod.rs:98
`get_fields` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. (×2) — reth/crates/storage/codecs/derive/src/compact/mod.rs:80, reth/crates/storage/codecs/derive/src/compact/mod.rs:102
`load_field` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. (×2) — reth/crates/storage/codecs/derive/src/compact/mod.rs:114, reth/crates/storage/codecs/derive/src/compact/mod.rs:119
`from` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/crates/storage/codecs/derive/src/compact/structs.rs:157
`from_compact` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface. (×2) — reth/crates/storage/codecs/src/lib.rs:89, reth/crates/storage/codecs/src/lib.rs:226
`specialized_from_compact` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface. — reth/crates/storage/codecs/src/lib.rs:244
`compress_to_buf` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. (×2) — reth/crates/storage/db-api/src/models/mod.rs:196, reth/crates/storage/db-api/src/models/mod.rs:248
`get` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled. — reth/crates/storage/db/src/static_file/cursor.rs:43
`add_active` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/storage/libmdbx-rs/src/txn_manager.rs:184
`canonical_hashes_range` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface. — reth/crates/storage/provider/src/providers/bundle_state_provider.rs:63
`state_root_from_nodes` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface. — reth/crates/storage/provider/src/providers/bundle_state_provider.rs:94
`sub_size` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/transaction-pool/src/blobstore/mod.rs:110
`sub_len` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/transaction-pool/src/blobstore/mod.rs:127
`delete_blob` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/transaction-pool/src/pool/mod.rs:835
`delete_blobs` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — reth/crates/transaction-pool/src/pool/mod.rs:840
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
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.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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` (reth/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. — reth/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` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:48, `implementation`), `DatabaseArguments` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:64, `implementation`), `DatabaseEnv` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:134, `implementation`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — reth/crates/storage/db/src/implementation/mdbx/mod.rs:48
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 71/74 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `nomt/benchtop`, `reth`, `reth/crates/optimism/bin`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
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.
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, `gitsubmodule`, 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. — REDACTED:2
What to do
Dependabot is configured but does not watch `cargo`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED 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.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse. — reth/.github/workflows/hive.yml:38
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
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 · 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 · 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 · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
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.3 / 10Weak✓ 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. — reth/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. — reth/crates/etl/src/lib.rs:271
`value_len` is read from the bytes being parsed at line 100 (`u32::from_le_bytes`), then used to size a `.resize` at line 101 — and nowhere in its scope is `value_len` 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_len` against the bytes actually remaining and a maximum the format allows before allocating. — nomt/nomt/src/rollback/delta.rs:101
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 loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.1 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`is_read_only` is public and takes a `StaticFileProviderInner` as its receiver from its caller, and it calls itself at line 246 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `is_read_only` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/manager.rs:246
`user_header` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 773 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `user_header` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:773
`user_header_mut` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 778 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `user_header_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:778
`set_block_range` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 784 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_block_range` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:784
`commit` is public, takes a document from its caller (line 208) and hands it to `update_index`, which calls itself at line 303 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_index` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:303
`commit` is public and takes a `StaticFileWriters` as its receiver from its caller, and it recurses at line 57 through `prune_receipt_data`, `prune_transaction_data`, `truncate`, `prune_header_data` and back with a piece of the document (and at line 214, line 216, line 218, line 225, line 448, line 698, line 721, line 740) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `commit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:57
`commit_without_sync_all` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 258 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `commit_without_sync_all` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:258
`increment_block` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 340 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `increment_block` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:340
`append_header` is public, takes a document from its caller (line 509) and hands it to `append_column`, which calls itself at line 479 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `append_column` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/provider/src/providers/static_file/writer.rs:479
`first` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 93 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `first` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/db/src/implementation/mdbx/cursor.rs:93
`next` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/db/src/implementation/mdbx/cursor.rs:105
`prev` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 109 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `prev` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/db/src/implementation/mdbx/cursor.rs:109
`last` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 113 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `last` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/db/src/implementation/mdbx/cursor.rs:113
`next_dup` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 163 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next_dup` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/storage/db/src/implementation/mdbx/cursor.rs:163
`add_rlpx_sub_protocol` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 135 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `add_rlpx_sub_protocol` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:135
`secret_key` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 147 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `secret_key` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:147
`peer_id` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 340 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `peer_id` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:340
`num_known_peers` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 350 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `num_known_peers` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:350
`fetch_client` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 373 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `fetch_client` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:373
`status` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 379 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `status` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:379
`poll` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 994 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `poll` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/manager.rs:994
`apply_reputation_change` is public, takes a document from its caller (line 405) and hands it to `unban_peer`, which calls itself at line 368 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `unban_peer` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/peers.rs:368
`on_session_closed` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 174 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `on_session_closed` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:174
`update_peer_block` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 252 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_peer_block` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:252
`update_fork_id` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 257 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_fork_id` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:257
`add_trusted_peer_id` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 292 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `add_trusted_peer_id` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:292
`add_peer_kind` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 297 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `add_peer_kind` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:297
`poll` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 424 with a piece of the document (and at line 428, line 443, line 480) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `poll` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/state.rs:424
`add_rlpx_sub_protocol` is public and takes a `Swarm` as its receiver from its caller, and it calls itself at line 75 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `add_rlpx_sub_protocol` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/swarm.rs:75
`dial_outbound` is public and takes a `Swarm` as its receiver from its caller, and it calls itself at line 107 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `dial_outbound` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/swarm.rs:107
`is_shutting_down` is public and takes a `Swarm` as its receiver from its caller, and it calls itself at line 275 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `is_shutting_down` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/swarm.rs:275
`on_network_state_change` is public and takes a `Swarm` as its receiver from its caller, and it calls itself at line 280 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `on_network_state_change` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/network/src/swarm.rs:280
`ban_ip` is public and takes a `Discv5` as its receiver from its caller, and it calls itself at line 145 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `ban_ip` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/net/discv5/src/lib.rs:145
`execute` is public and takes a `Command` as its receiver from its caller, and it calls itself at line 51 with a piece of the document (and at line 52, line 53, line 54) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `execute` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/cli/commands/src/stage/mod.rs:51
`execute` is public and takes a `Command` as its receiver from its caller, and it calls itself at line 350 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `execute` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/cli/commands/src/stage/run.rs:350
`execute` is public and takes a `Command` as its receiver from its caller, and it calls itself at line 32 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `execute` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/cli/commands/src/recover/mod.rs:32
`execute` is public and takes a `Command` as its receiver from its caller, and it calls itself at line 159 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `execute` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/cli/commands/src/p2p/mod.rs:159
`execute` is public and takes a `Command` as its receiver from its caller, and it calls itself at line 89 with a piece of the document (and at line 94, line 99, line 104, line 109, line 134) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `execute` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/cli/commands/src/db/mod.rs:89
`hash` is public and takes a `BlockState` as its receiver from its caller, and it calls itself at line 647 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `hash` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — reth/crates/chain-state/src/in_memory.rs:647
`read_transaction` is public and takes a `Store` as its receiver from its caller, and it calls itself at line 247 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `read_transaction` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — nomt/nomt/src/store/mod.rs:247
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`system_caller` (line 264) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:264
`system_caller` (line 201) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:201
`system_caller` (line 334) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:334
`system_caller` (line 204) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/optimism/payload/src/builder.rs:204
`system_caller` (line 126) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/optimism/evm/src/execute.rs:126
`rpc_consensus_client` (line 315) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/node/builder/src/launch/engine.rs:315
`rpc_consensus_client` (line 404) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/node/builder/src/launch/mod.rs:404
`rpc_consensus_client` (line 417) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/node/builder/src/launch/mod.rs:417
`system_caller` (line 163) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/ethereum/payload/src/lib.rs:163
`system_caller` (line 146) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/ethereum/evm/src/execute.rs:146
`system_caller` (line 289) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/engine/util/src/reorg.rs:289
`system_caller` (line 87) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends. — reth/crates/engine/invalid-block-hooks/src/witness.rs:87
`std::mem::forget(_enter)` (line 111) takes `_enter` out of Rust's ownership: its `Drop` never runs, so whatever it holds — a descriptor, a socket, a buffer, a lock — is never given back, and nothing can give it back later because the value is gone. Let it drop (or call its explicit close) where its work ends; if the handle must outlive this function, turn it into a raw handle with `into_raw`/`into_raw_fd` and reclaim it with the matching `from_raw` when the owner is done. — nomt/torture/src/logging.rs:111
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
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.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
`trace!` at line 279 is called with an argument built by `self.active.iter().map(|entry|{let(tx,start)=entry.value();(tx.clone(),start.elapsed())}).collect::<Vec<_>>()` (line 285), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls. — reth/crates/storage/libmdbx-rs/src/txn_manager.rs:279
`trace!` at line 745 is called with an argument built by `valid_announcement_data.iter().count()` (line 747), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls. — reth/crates/net/network/src/transactions/mod.rs:745
`trace!` at line 548 is called with an argument built by `format!("{:#?}",pulse_lookup_interval)` (line 551), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls. — reth/crates/net/discv5/src/lib.rs:548
`trace!` at line 566 is called with an argument built by `format!("{:#?}",lookup_interval)` (line 568), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls. — reth/crates/net/discv5/src/lib.rs:566
`trace!` at line 635 is called with an argument built by `format!("{:#?}",target)` (line 636), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls. — reth/crates/net/discv5/src/lib.rs:635
What to do
In Rust, hand the logger the value and let it format only what it writes: `debug!("rows: {:?}", rows)` or a field, `debug!(rows = ?rows, "loaded")` — `format_args!` and `?`/`%` fields defer the formatting. When the line needs a computed view (a `collect`, a `join`, a `serde_json::to_string`), put it behind `if log_enabled!(Level::Debug)` (`if tracing::enabled!(Level::DEBUG)` for tracing), which asks the target's own filter. The macros put their arguments behind the global maximum level only, so a collect or serialisation in the argument runs whenever any target is at debug, and the logger then drops this line.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
`Discv4Config.enable_packet_filter` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/net/discv4/src/config.rs:23
`NewBlock.td` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/net/eth-wire-types/src/broadcast.rs:83
`SessionLimits.max_established_inbound` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/net/network-types/src/session/config.rs:116
`SessionLimits.max_established_outbound` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/net/network-types/src/session/config.rs:118
`BenchmarkArgs.engine_rpc_url` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/node/core/src/args/benchmark_args.rs:34
`NetworkArgs.dns_retries` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/node/core/src/args/network.rs:68
`RollupArgs.enable_genesis_walkback` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/optimism/node/src/args.rs:24
`TxEip4844.placeholder` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/storage/codecs/src/alloy/transaction/eip4844.rs:28
`Withdrawal.validator_index` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — reth/crates/storage/codecs/src/alloy/withdrawal.rs:16
What to do
Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. 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.
`debug!` at line 298 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`. — reth/crates/transaction-pool/src/maintain.rs:298
`error!` at line 661 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`. — reth/crates/transaction-pool/src/maintain.rs:661
`debug!` at line 176 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`. — reth/crates/transaction-pool/src/pool/best.rs:176
`debug!` at line 479 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`. — reth/crates/transaction-pool/src/pool/mod.rs:479
`debug!` at line 607 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`. — reth/crates/transaction-pool/src/pool/mod.rs:607
`debug!` at line 826 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`. — reth/crates/transaction-pool/src/pool/mod.rs:826
`warn!` at line 828 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`. — reth/crates/transaction-pool/src/pool/mod.rs:828
`debug!` at line 896 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`. — reth/crates/transaction-pool/src/pool/mod.rs:896
`debug!` at line 937 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`. — reth/crates/transaction-pool/src/pool/mod.rs:937
`trace!` at line 826 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`. — reth/crates/transaction-pool/src/pool/txpool.rs:826
`trace!` at line 838 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`. — reth/crates/transaction-pool/src/pool/txpool.rs:838
`trace!` at line 356 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`. — reth/crates/transaction-pool/src/blobstore/disk.rs:356
`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`. — reth/crates/tokio-util/src/event_stream.rs:38
`error!` at line 405 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`. — reth/crates/tasks/src/lib.rs:405
`error!` at line 465 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`. — reth/crates/tasks/src/lib.rs:465
`error!` 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: `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`. — reth/crates/tasks/src/lib.rs:514
`warn!` at line 177 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`. — reth/crates/storage/provider/src/providers/static_file/manager.rs:177
`warn!` 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: `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`. — reth/crates/storage/provider/src/providers/static_file/manager.rs:183
`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`. — reth/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`. — reth/crates/storage/db-common/src/db_tool/mod.rs:145
`warn!` at line 321 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`. — reth/crates/storage/db/src/implementation/mdbx/mod.rs:321
`info!` at line 261 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`. — reth/crates/stages/stages/src/stages/hashing_account.rs:261
`info!` at line 196 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`. — reth/crates/stages/stages/src/stages/hashing_storage.rs:196
`error!` at line 508 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`. — reth/crates/stages/api/src/pipeline/mod.rs:508
`error!` at line 537 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`. — reth/crates/stages/api/src/pipeline/mod.rs:537
`error!` at line 565 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`. — reth/crates/stages/api/src/pipeline/mod.rs:565
`warn!` at line 570 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`. — reth/crates/stages/api/src/pipeline/mod.rs:570
`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`. — reth/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`. — reth/crates/rpc/rpc-layer/src/jwt_validator.rs:36
`debug!` at line 172 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`. — reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:172
`trace!` at line 136 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`. — reth/crates/rpc/rpc/src/eth/filter.rs:136
`info!` 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: `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`. — reth/crates/rpc/rpc/src/eth/sim_bundle.rs:36
`warn!` at line 112 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`. — reth/crates/rpc/ipc/src/server/connection.rs:112
`debug!` at line 159 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`. — reth/crates/rpc/ipc/src/server/connection.rs:159
`trace!` at line 178 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`. — reth/crates/rpc/ipc/src/server/mod.rs:178
`trace!` at line 379 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`. — reth/crates/rpc/ipc/src/server/mod.rs:379
`debug!` at line 157 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`. — reth/crates/prune/prune/src/pruner.rs:157
`info!` at line 136 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`. — reth/crates/optimism/cli/src/lib.rs:136
`warn!` at line 212 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`. — reth/crates/optimism/cli/src/commands/import_receipts.rs:212
`info!` at line 155 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`. — reth/crates/node/events/src/node.rs:155
Other · Code Health — Whether Rust's absent values are handled rather than forced — `Option` and `Result` make absence a value the caller must handle in every crate, and each `.unwrap()` or `.expect()` that no guard on its path proves present is a panic the first time the value is `None` or `Err`.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
`StdRng::from_rng(thread_rng())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rng` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/testing/testing-utils/src/generators.rs:74
`sign_message(B256::from_slice(&key_pair.secret_bytes()[..]),tx.signature_hash())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `sign_tx_with_key_pair` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/testing/testing-utils/src/generators.rs:154
`state.get_mut(&from)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `random_changeset_range` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/testing/testing-utils/src/generators.rs:323
`state.get_mut(&to)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `random_changeset_range` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/testing/testing-utils/src/generators.rs:330
`self.walker.hash()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `try_next` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/trie/trie/src/node_iter.rs:98
`this.node(true)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/trie/trie/src/walker.rs:119
`self.key()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `node` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/trie/trie/src/walker.rs:157
`CHILD_INDEX_RANGE.clone().find(|i|n.state_mask.is_bit_set(*i))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/trie/trie/src/trie_cursor/subnode.rs:62
`self.node.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `hash` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/trie/trie/src/trie_cursor/subnode.rs:103
`results.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/lib.rs:357
`self.get(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — reth/crates/transaction-pool/src/pool/blob.rs:48, reth/crates/transaction-pool/src/pool/parked.rs:63
`self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `enforce_pending_fees` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/blob.rs:205
`self.all.last()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `truncate_pool` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/blob.rs:228
`self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `truncate_pool` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/blob.rs:230
`results.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_transaction_and_subscribe` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/mod.rs:524
`self.get(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `satisfy_base_fee_transactions` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/parked.rs:283
`self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `enforce_basefee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/parked.rs:320
`self.get(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/pending.rs:296
`self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_blob_fee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — reth/crates/transaction-pool/src/pool/txpool.rs:162, reth/crates/transaction-pool/src/pool/txpool.rs:179
`self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_basefee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — reth/crates/transaction-pool/src/pool/txpool.rs:209, reth/crates/transaction-pool/src/pool/txpool.rs:226
`descendants.peek()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `insert_tx` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/transaction-pool/src/pool/txpool.rs:1645
`std::fs::create_dir_all(log_dir)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `create_log_dir` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/tracing/src/layers.rs:136
`RollingFileAppender::new(log_dir.join(&self.file_name),RollingConditionBasic::new().max_size(self.max_size_bytes),self.max_files,)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `create_log_writer` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/tracing/src/layers.rs:153
`err` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `poll` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/tasks/src/lib.rs:244
`self.get_mut().guard.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `poll` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/tasks/src/shutdown.rs:40
`self.static_file.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `static_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/writer/mod.rs:83
`self.static_file.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `static_file_mut` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/writer/mod.rs:91
`block.block().clone().try_with_senders_unchecked(block.senders().clone())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `save_blocks` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/writer/mod.rs:198
`self.static_file().get_highest_static_file_block(StaticFileSegment::Headers)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `remove_blocks_above` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/writer/mod.rs:281
`receipt.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `append_block_receipts` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/writer/static_file.rs:23
`in_memory_chain.first().as_ref().map(|b|b.number())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_in_memory_or_storage_by_block_range_while` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/blockchain_provider.rs:341
`tx.send(res)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `watch_directory` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:117
`RecommendedWatcher::new(move|res|tx.send(res).unwrap(),notify::Config::default(),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `watch_directory` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:120
`watcher.watch(&provider.path,RecursiveMode::NonRecursive)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `watch_directory` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:124
`segment.file_stem()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `watch_directory` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:155
`Arc::try_unwrap(self.0)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `with_custom_blocks_per_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:261
`Arc::try_unwrap(self.0)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `with_metrics` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — reth/crates/storage/provider/src/providers/static_file/manager.rs:269
What to do
Each row is a forced `Option`/`Result` no guard on its path proves present. Handle the absent case where it arises rather than forcing it: `?` to hand it to the caller, `if let` / `match` / `let … else` to branch on it, `unwrap_or` / `unwrap_or_default` / `unwrap_or_else` where a default is right. Where the value genuinely cannot be absent, say so in a way a reader can check from the line: test it first (`if x.is_none() { return … }`), look the key up with `contains_key` or the index against `len()`, or construct the value so it cannot be absent.
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 — 1 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.
D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 60 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 (5 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (5 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 — Not applicable: 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.
AX4 Dependency direction — not applicable to a transaction-script/CRUD architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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
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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~16488 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
D13 Secret Scanning — Secret Scanning not included (time budget)
D16 Bus Factor — too few commits for a meaningful bus factor
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.
D20 ADR Quality — N/A — this repo declares itself a template / kata / sample / demo; a formal ADR log is deferred to a real application built from it.
D21 Naming Consistency — D21 withholds its sibling role token rows: 2 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go 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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .rs source were not judged.
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.
D34 Knowledge Freshness — too few commits to judge knowledge freshness
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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): 167 value object(s); 18 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
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'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Rust source, so there is no service whose uptime a failing dependency could take down
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.
S1 Web-Security Posture — No web surface: 1117 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
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
X24 Document value interpolated into markup unescaped — 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.
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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X7 Silent fallback defaults — 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: kvdb — `kvdb` 0.4.0 is published on crates.io under `GPL-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.
Banned license: kvdb-memorydb — `kvdb-memorydb` 0.4.0 is published on crates.io under `GPL-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.
Banned license: atomptr — `atomptr` 1.4.1 is published on crates.io under `GPL-3.0-or-later`, 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.
D30 · Dependency Vulnerabilities· High vulnerability · ×3
TodoComment reth/testing/testing-utils/src/generators.rs:433— // todo: can a non-eoa account have a nonce > 0? — 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 reth/testing/testing-utils/src/generators.rs:552— // TODO resolve dependency issue — 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 reth/testing/ef-tests/tests/tests.rs:81— // TODO: Add ValidBlocks and InvalidBlocks tests — 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 reth/examples/db-access/src/main.rs:25— // TODO: Should the DB version include the spec so that you do not need to specify it here? — 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 reth/examples/db-access/src/main.rs:196— // TODO: Make it clearer how to choose between event_signature(topic0) (event name) and 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 reth/examples/db-access/src/main.rs:231— // TODO: unimplemented. — 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 reth/crates/trie/trie/src/trie.rs:199— // TODO: We can consider introducing the TrieProgress::Progress/Complete — 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 reth/crates/transaction-pool/src/test_utils/pool.rs:128— // TODO(mattsse): need a way expect based on the current state of the pool and tx — 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 reth/crates/transaction-pool/src/test_utils/pool.rs:138— // TODO(mattsse): check subpools — 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 reth/crates/transaction-pool/src/pool/blob.rs:395— // 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 reth/crates/transaction-pool/src/pool/parked.rs:509— // TODO: temporary solution for ordering the queued 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 reth/crates/transaction-pool/src/pool/parked.rs:566— // TODO: test change might not be intended, re review — 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 reth/crates/transaction-pool/benches/truncate.rs:28— // TODO: for blob truncate, this would need a flag for _only_ generating 4844 mock transactions — 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 reth/crates/transaction-pool/benches/truncate.rs:102— // TODO: benchmark blob truncate — 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 reth/crates/storage/provider/src/writer/mod.rs:187— // TODO: remove all the clones and do performant / batched writes for each type of object — 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 reth/crates/storage/provider/src/test_utils/blocks.rs:52— // TODO check after this gets done: https://github.com/paradigmxyz/reth/issues/1588
TodoComment reth/crates/storage/provider/src/providers/blockchain_provider.rs:1356— // TODO(joshie): port history_by_block_hash to DatabaseProvider and use db_provider — 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 reth/crates/storage/provider/src/providers/blockchain_provider.rs:1477— // TODO: should we only apply this for the RPCs that are listed in EIP-1898?
TodoComment reth/crates/storage/provider/src/providers/mod.rs:820— // TODO: should we only apply this for the RPCs that are listed in EIP-1898?
TodoComment reth/crates/storage/provider/src/providers/blockchain_provider.rs:1563— // TODO: EIP-1898 question, see above
TodoComment reth/crates/storage/provider/src/providers/mod.rs:897— // TODO: EIP-1898 question, see above
TodoComment reth/crates/storage/provider/src/providers/blockchain_provider.rs:1843— // TODO: this should be moved inside `insert_historical_block`: <https://github.com/paradigmxyz/reth/issues/11524>
TodoComment reth/crates/storage/provider/src/providers/blockchain_provider.rs:3324— // 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 reth/crates/storage/provider/src/providers/blockchain_provider.rs:3450— // TODO: header should use B256 like others instead of &B256 — 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 reth/crates/storage/provider/src/providers/blockchain_provider.rs:3673— // 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.
+ 137 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×47
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 22 more in this group — see findings.md.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×40
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/manager.rs:246— `is_read_only` is public and takes a `StaticFileProviderInner` as its receiver from its caller, and it calls itself at line 246 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `is_read_only` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:773— `user_header` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 773 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `user_header` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:778— `user_header_mut` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 778 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `user_header_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:784— `set_block_range` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 784 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_block_range` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:303— `commit` is public, takes a document from its caller (line 208) and hands it to `update_index`, which calls itself at line 303 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_index` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:57— `commit` is public and takes a `StaticFileWriters` as its receiver from its caller, and it recurses at line 57 through `prune_receipt_data`, `prune_transaction_data`, `truncate`, `prune_header_data` and back with a piece of the document (and at line 214, line 216, line 218, line 225, line 448, line 698, line 721, line 740) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `commit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:258— `commit_without_sync_all` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 258 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `commit_without_sync_all` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:340— `increment_block` is public and takes a `StaticFileProviderRW` as its receiver from its caller, and it calls itself at line 340 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `increment_block` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/provider/src/providers/static_file/writer.rs:479— `append_header` is public, takes a document from its caller (line 509) and hands it to `append_column`, which calls itself at line 479 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `append_column` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/db/src/implementation/mdbx/cursor.rs:93— `first` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 93 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `first` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/db/src/implementation/mdbx/cursor.rs:105— `next` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/db/src/implementation/mdbx/cursor.rs:109— `prev` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 109 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `prev` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/db/src/implementation/mdbx/cursor.rs:113— `last` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 113 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `last` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/storage/db/src/implementation/mdbx/cursor.rs:163— `next_dup` is public and takes a `Cursor` as its receiver from its caller, and it calls itself at line 163 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next_dup` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:135— `add_rlpx_sub_protocol` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 135 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `add_rlpx_sub_protocol` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:147— `secret_key` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 147 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `secret_key` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:340— `peer_id` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 340 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `peer_id` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:350— `num_known_peers` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 350 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `num_known_peers` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:373— `fetch_client` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 373 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `fetch_client` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:379— `status` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 379 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `status` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/manager.rs:994— `poll` is public and takes a `NetworkManager` as its receiver from its caller, and it calls itself at line 994 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `poll` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/peers.rs:368— `apply_reputation_change` is public, takes a document from its caller (line 405) and hands it to `unban_peer`, which calls itself at line 368 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `unban_peer` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/state.rs:174— `on_session_closed` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 174 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `on_session_closed` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/state.rs:252— `update_peer_block` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 252 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_peer_block` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap reth/crates/net/network/src/state.rs:257— `update_fork_id` is public and takes a `NetworkState` as its receiver from its caller, and it calls itself at line 257 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `update_fork_id` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
+ 15 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×40
Symbol treated as nullable, then dereferenced unguarded reth/testing/testing-utils/src/generators.rs:74— `StdRng::from_rng(thread_rng())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rng` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/testing/testing-utils/src/generators.rs:154— `sign_message(B256::from_slice(&key_pair.secret_bytes()[..]),tx.signature_hash())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `sign_tx_with_key_pair` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/testing/testing-utils/src/generators.rs:323— `state.get_mut(&from)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `random_changeset_range` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/testing/testing-utils/src/generators.rs:330— `state.get_mut(&to)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `random_changeset_range` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/trie/trie/src/node_iter.rs:98— `self.walker.hash()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `try_next` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/trie/trie/src/walker.rs:119— `this.node(true)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/trie/trie/src/walker.rs:157— `self.key()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `node` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/trie/trie/src/trie_cursor/subnode.rs:62— `CHILD_INDEX_RANGE.clone().find(|i|n.state_mask.is_bit_set(*i))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/trie/trie/src/trie_cursor/subnode.rs:103— `self.node.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `hash` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/lib.rs:357— `results.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/blob.rs:48— `self.get(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/blob.rs:205— `self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `enforce_pending_fees` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/blob.rs:228— `self.all.last()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `truncate_pool` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/blob.rs:230— `self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `truncate_pool` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/mod.rs:524— `results.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_transaction_and_subscribe` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/parked.rs:63— `self.get(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/parked.rs:283— `self.get(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `satisfy_base_fee_transactions` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/parked.rs:320— `self.remove_transaction(&id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `enforce_basefee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/pending.rs:296— `self.get(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `add_transaction` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/txpool.rs:162— `self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_blob_fee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/txpool.rs:179— `self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_blob_fee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/txpool.rs:209— `self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_basefee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/txpool.rs:226— `self.all_transactions.txs.get_mut(tx.id())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update_basefee` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/transaction-pool/src/pool/txpool.rs:1645— `descendants.peek()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `insert_tx` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded reth/crates/tracing/src/layers.rs:136— `std::fs::create_dir_all(log_dir)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `create_log_dir` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
+ 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×39
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 14 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×30
FileTooLong: database/provider.rs reth/crates/storage/provider/src/providers/database/provider.rs— FileTooLong — 2254 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 93% of them inside a single declaration: DatabaseProvider (44 blocks, 119-3658). The bar is 500 significant lines; this is 1754 over it, 4.51× 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: tree/mod.rs reth/crates/engine/tree/src/tree/mod.rs— FileTooLong — 1285 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: EngineApiTreeHandler (3 blocks, 466-2554). The bar is 500 significant lines; this is 785 over it, 2.57× 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 reth/crates/net/discv4/src/lib.rs— FileTooLong — 1133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: Discv4Service (4 blocks, 424-1764). The bar is 500 significant lines; this is 633 over it, 2.27× 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 reth/crates/rpc/rpc-builder/src/lib.rs— FileTooLong — 1064 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 564 over it, 2.13× 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/blockchain_provider.rs reth/crates/storage/provider/src/providers/blockchain_provider.rs— FileTooLong — 1038 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: BlockchainProvider2 (29 blocks, 52-1710). The bar is 500 significant lines; this is 538 over it, 2.08× 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 reth/crates/storage/provider/src/providers/static_file/manager.rs— FileTooLong — 972 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 (14 blocks, 80-1676). The bar is 500 significant lines; this is 472 over it, 1.94× 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/txpool.rs reth/crates/transaction-pool/src/pool/txpool.rs— FileTooLong — 951 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 451 over it, 1.90× 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: engine/mod.rs reth/crates/consensus/beacon/src/engine/mod.rs— FileTooLong — 943 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: BeaconConsensusEngine (2 blocks, 175-1788). The bar is 500 significant lines; this is 443 over it, 1.89× 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: transaction/mod.rs reth/crates/primitives/src/transaction/mod.rs— FileTooLong — 885 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 385 over it, 1.77× 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 reth/crates/net/network/src/transactions/mod.rs— FileTooLong — 859 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: TransactionsManager (5 blocks, 195-1381). The bar is 500 significant lines; this is 359 over it, 1.72× 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 reth/crates/rpc/rpc/src/debug.rs— FileTooLong — 810 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: DebugApi (6 blocks, 50-1206). The bar is 500 significant lines; this is 310 over it, 1.62× 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: transactions/fetcher.rs reth/crates/net/network/src/transactions/fetcher.rs— FileTooLong — 723 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: TransactionFetcher (4 blocks, 73-1077). The bar is 500 significant lines; this is 223 over it, 1.45× 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/blockchain_tree.rs reth/crates/blockchain-tree/src/blockchain_tree.rs— FileTooLong — 715 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: BlockchainTree (3 blocks, 63-1374). The bar is 500 significant lines; this is 215 over it, 1.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: session/mod.rs reth/crates/net/network/src/session/mod.rs— FileTooLong — 670 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 170 over it, 1.34× 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: helpers/call.rs reth/crates/rpc/rpc-eth-api/src/helpers/call.rs— FileTooLong — 664 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 164 over it, 1.33× 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: supervisor/workload.rs nomt/torture/src/supervisor/workload.rs— FileTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: Workload (2 blocks, 102-1078). The bar is 500 significant lines; this is 151 over it, 1.30× 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/manager.rs reth/crates/net/network/src/manager.rs— FileTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: NetworkManager (3 blocks, 79-1054). The bar is 500 significant lines; this is 136 over it, 1.27× 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: headers/reverse_headers.rs reth/crates/net/downloaders/src/headers/reverse_headers.rs— FileTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: ReverseHeadersDownloader (5 blocks, 67-884). The bar is 500 significant lines; this is 132 over it, 1.26× 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 nomt/trickfs/src/lib.rs— FileTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: Trick (3 blocks, 318-897). The bar is 500 significant lines; this is 122 over it, 1.24× 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 reth/crates/transaction-pool/src/pool/mod.rs— FileTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: PoolInner (3 blocks, 134-876). The bar is 500 significant lines; this is 108 over it, 1.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/engine_api.rs reth/crates/rpc/rpc-engine-api/src/engine_api.rs— FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: EngineApi (4 blocks, 46-957). The bar is 500 significant lines; this is 75 over it, 1.15× 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: merkle/seek.rs nomt/nomt/src/merkle/seek.rs— FileTooLong — 574 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 74 over it, 1.15× 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 reth/crates/node/builder/src/launch/common.rs— FileTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: LaunchContextWith (11 blocks, 203-946). The bar is 500 significant lines; this is 67 over it, 1.13× 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: providers/mod.rs reth/crates/storage/provider/src/providers/mod.rs— FileTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: BlockchainProvider (31 blocks, 75-946). The bar is 500 significant lines; this is 65 over it, 1.13× 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/traits.rs reth/crates/transaction-pool/src/traits.rs— FileTooLong — 561 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 61 over it, 1.12× 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.
+ 3 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×26
Duplicated block (8 lines × 2) nomt/nomt/src/store/mod.rs:97— nomt/nomt/src/store/mod.rs:97-105 | nomt/nomt/src/store/mod.rs:107-114 — 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 `nomt/nomt/src/store/mod.rs:97` 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) reth/crates/blockchain-tree-api/src/error.rs:187— reth/crates/blockchain-tree-api/src/error.rs:187-194 | reth/crates/blockchain-tree-api/src/error.rs:233-240 — 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 (8 lines × 2) reth/crates/cli/commands/src/stage/dump/execution.rs:76— reth/crates/cli/commands/src/stage/dump/execution.rs:76-83 | reth/crates/cli/commands/src/stage/dump/merkle.rs:37-45 — 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 `reth/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 lines × 2) reth/crates/config/src/config.rs:50— reth/crates/config/src/config.rs:50-57 | reth/crates/node/core/src/node_config.rs:417-424 — 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 `reth/crates/config/src/config.rs:50` 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 lines × 2) reth/crates/consensus/beacon/src/engine/sync.rs:237— reth/crates/consensus/beacon/src/engine/sync.rs:237-244 | reth/crates/engine/tree/src/backfill.rs:160-167 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/sync.rs` and `reth/crates/engine/tree/src/backfill.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `reth/crates/consensus/beacon/src/engine/sync.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 (8 lines × 2) reth/crates/ethereum/consensus/src/validation.rs:17— reth/crates/ethereum/consensus/src/validation.rs:17-24 | reth/crates/optimism/consensus/src/validation.rs:34-41 — 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 (8 lines × 2) reth/crates/net/downloaders/src/file_client.rs:217— reth/crates/net/downloaders/src/file_client.rs:217-224 | reth/crates/net/downloaders/src/receipt_file_client.rs:89-96 — 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 `reth/crates/net/downloaders/src/file_client.rs:217` 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) reth/crates/node/builder/src/launch/engine.rs:203— reth/crates/node/builder/src/launch/engine.rs:203-210 | reth/crates/node/builder/src/launch/mod.rs:287-294 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 (8 lines × 2) reth/crates/optimism/payload/src/payload.rs:54— reth/crates/optimism/payload/src/payload.rs:54-61 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:30-37 — 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 `reth/crates/optimism/payload/src/payload.rs:54` 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 (8 lines × 2) reth/crates/primitives/src/transaction/mod.rs:262— reth/crates/primitives/src/transaction/mod.rs:262-269 | reth/crates/primitives/src/transaction/mod.rs:472-479 — 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 `reth/crates/primitives/src/transaction/mod.rs:262` 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 lines × 2) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:287— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:287-294 | reth/crates/rpc/rpc/src/debug.rs:524-533 — 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 `reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:287` 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) reth/crates/rpc/rpc/src/debug.rs:424— reth/crates/rpc/rpc/src/debug.rs:424-431 | reth/crates/rpc/rpc/src/debug.rs:766-773 — 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 `reth/crates/rpc/rpc/src/debug.rs:424` 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) reth/crates/rpc/rpc/src/otterscan.rs:171— reth/crates/rpc/rpc/src/otterscan.rs:171-178 | reth/crates/rpc/rpc/src/otterscan.rs:183-190 — 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 `reth/crates/rpc/rpc/src/otterscan.rs:171` 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1521— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1521-1528 | reth/crates/storage/provider/src/providers/mod.rs:855-862 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 (8 lines × 2) reth/crates/trie/trie/src/trie.rs:184— reth/crates/trie/trie/src/trie.rs:184-191 | reth/crates/trie/trie/src/trie.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. Read the line range as the matched WINDOW rather than a finished unit: at `reth/crates/trie/trie/src/trie.rs:184` 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) reth/crates/ethereum/payload/src/lib.rs:136— reth/crates/ethereum/payload/src/lib.rs:136-143 | reth/crates/optimism/payload/src/builder.rs:169-176 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 (8 lines × 2) reth/crates/rpc/rpc-testing-util/src/trace.rs:453— reth/crates/rpc/rpc-testing-util/src/trace.rs:453-460 | reth/crates/rpc/rpc-testing-util/src/trace.rs:489-496 — 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 `reth/crates/rpc/rpc-testing-util/src/trace.rs:453` 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) reth/crates/ethereum/evm/src/execute.rs:469— reth/crates/ethereum/evm/src/execute.rs:469-476 | reth/crates/optimism/evm/src/execute.rs:488-495 — before extracting anything, compare `reth/crates/ethereum/evm/src/execute.rs` and `reth/crates/optimism/evm/src/execute.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `reth/crates/ethereum/evm/src/execute.rs:464` calls `save_requests` and `reth/crates/optimism/evm/src/execute.rs:483` 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) reth/crates/ethereum/payload/src/lib.rs:70— reth/crates/ethereum/payload/src/lib.rs:70-77 | reth/crates/optimism/payload/src/builder.rs:82-89 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/ethereum/payload/src/lib.rs:70` 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 `config` to `&PayloadConfig<EthPayloadBuilderAttributes>` in one and `&PayloadConfig<OptimismPayloadBuilderAttributes>` 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) reth/crates/primitives/src/transaction/mod.rs:1305— reth/crates/primitives/src/transaction/mod.rs:1305-1312 | reth/crates/primitives/src/transaction/pooled.rs:323-330 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:616— reth/crates/storage/provider/src/providers/blockchain_provider.rs:616-623 | reth/crates/storage/provider/src/providers/mod.rs:156-163 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 (8 lines × 2) reth/crates/blockchain-tree/src/metrics.rs:38— reth/crates/blockchain-tree/src/metrics.rs:38-45 | reth/crates/storage/provider/src/providers/database/metrics.rs:35-42 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `MakeCanonicalAction` in one and `Action` 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) reth/crates/cli/commands/src/db/stats.rs:85— reth/crates/cli/commands/src/db/stats.rs:85-95 | reth/crates/storage/db/src/implementation/mdbx/mod.rs:179-186 — 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) reth/crates/prune/prune/src/segments/user/account_history.rs:54— reth/crates/prune/prune/src/segments/user/account_history.rs:54-61 | reth/crates/prune/prune/src/segments/user/storage_history.rs:54-61 — before extracting anything, compare `reth/crates/prune/prune/src/segments/user/account_history.rs` and `reth/crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `reth/crates/prune/prune/src/segments/user/account_history.rs:54` 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) reth/crates/stages/stages/src/stages/hashing_account.rs:257— reth/crates/stages/stages/src/stages/hashing_account.rs:257-264 | reth/crates/stages/stages/src/stages/hashing_storage.rs:192-199 — before extracting anything, compare `reth/crates/stages/stages/src/stages/hashing_account.rs` and `reth/crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `reth/crates/stages/stages/src/stages/hashing_account.rs:257` 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.
Off the main sequence: reth-ipc — reth-ipc: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 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 25 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 3 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 2 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-static-file-types — reth-static-file-types: 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-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: trickfs — trickfs: 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-prune-types — reth-prune-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: nomt-core — nomt-core: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: reth-libmdbx — reth-libmdbx: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 1 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 16 project(s), so it's rigid to change.
Off the main sequence: reth-cli-util — reth-cli-util: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: reth-execution-types — reth-execution-types: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: reth-rpc-layer — reth-rpc-layer: abstractness 0.14, instability 0.00, distance 0.86 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: reth-stages-types — reth-stages-types: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: reth-codecs — reth-codecs: abstractness 0.07, instability 0.08, distance 0.85 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
Off the main sequence: reth-cli-runner — reth-cli-runner: abstractness 0.00, instability 0.17, distance 0.83 — 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.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: reth-tasks — reth-tasks: abstractness 0.13, instability 0.05, distance 0.83 — zone of pain — concrete and depended on by 19 project(s), so it's rigid to change.
Off the main sequence: reth-config — reth-config: abstractness 0.00, instability 0.23, distance 0.77 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
Off the main sequence: reth-ethereum-forks — reth-ethereum-forks: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: reth-consensus — reth-consensus: abstractness 0.20, instability 0.05, distance 0.75 — zone of pain — concrete and depended on by 21 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.
IC1 · Incompleteness & stubs· Empty method body · ×22
Empty method body — does nothing with its inputs nomt/benchtop/src/sp_trie.rs:129— `note_read` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs nomt/nomt/src/rollback/mod.rs:398— `tentative_preserve_prior` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs nomt/torture/src/supervisor/mod.rs:209— `print_flag` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/discv4/src/lib.rs:395— `send_to_service` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/discv5/src/config.rs:318— `insert_unsigned_boot_node` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/dns/src/lib.rs:76— `sync_tree_with_link` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/downloaders/src/headers/task.rs:85— `update_sync_gap` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/downloaders/src/headers/task.rs:89— `update_local_head` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/downloaders/src/headers/task.rs:93— `update_sync_target` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/downloaders/src/headers/task.rs:97— `set_batch_size` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/eth-wire/src/multiplex.rs:646— `send_raw` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/network-api/src/events.rs:158— `send_err_response` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/network/src/network.rs:105— `send_message` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/net/network/src/transactions/mod.rs:95— `send` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/stages/api/src/pipeline/mod.rs:98— `set_tip` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/storage/db-api/src/models/mod.rs:196— `compress_to_buf` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/storage/db-api/src/models/mod.rs:248— `compress_to_buf` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/storage/libmdbx-rs/src/txn_manager.rs:184— `add_active` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/transaction-pool/src/blobstore/mod.rs:110— `sub_size` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/transaction-pool/src/blobstore/mod.rs:127— `sub_len` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/transaction-pool/src/pool/mod.rs:835— `delete_blob` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs reth/crates/transaction-pool/src/pool/mod.rs:840— `delete_blobs` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
ClassTooLong: DatabaseProvider reth/crates/storage/provider/src/providers/database/provider.rs:130— ClassTooLong — 2106 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, 44 blocks, lines 119-3658. The bar is 400 significant lines; this is 1706 over it, 5.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.
ClassTooLong: EngineApiTreeHandler reth/crates/engine/tree/src/tree/mod.rs:466— ClassTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 3 blocks, lines 466-2554. The bar is 400 significant lines; this is 650 over it, 2.63× 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: BlockchainProvider2 reth/crates/storage/provider/src/providers/blockchain_provider.rs:52— ClassTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 29 blocks, lines 52-1710. The bar is 400 significant lines; this is 599 over it, 2.50× 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 reth/crates/storage/provider/src/providers/static_file/manager.rs:78— ClassTooLong — 868 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 28 methods, 14 blocks, lines 80-1676. The bar is 400 significant lines; this is 468 over it, 2.17× 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: BeaconConsensusEngine reth/crates/consensus/beacon/src/engine/mod.rs:175— ClassTooLong — 797 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 2 blocks, lines 175-1788. The bar is 400 significant lines; this is 397 over it, 1.99× 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 reth/crates/rpc/rpc/src/debug.rs:50— ClassTooLong — 766 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, 6 blocks, lines 50-1206. The bar is 400 significant lines; this is 366 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: Discv4Service reth/crates/net/discv4/src/lib.rs:424— ClassTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 50 methods, 4 blocks, lines 424-1764. The bar is 400 significant lines; this is 299 over it, 1.75× 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: BlockchainTree reth/crates/blockchain-tree/src/blockchain_tree.rs:63— ClassTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 3 blocks, lines 63-1374. The bar is 400 significant lines; this is 283 over it, 1.71× 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 reth/crates/net/network/src/transactions/mod.rs:195— ClassTooLong — 590 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, 5 blocks, lines 195-1381. The bar is 400 significant lines; this is 190 over it, 1.48× 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 reth/crates/net/network/src/manager.rs:79— ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 3 blocks, lines 79-1054. The bar is 400 significant lines; this is 185 over it, 1.46× 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: Workload nomt/torture/src/supervisor/workload.rs:102— ClassTooLong — 585 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, 2 blocks, lines 102-1078. The bar is 400 significant lines; this is 185 over it, 1.46× 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 reth/crates/net/network/src/transactions/fetcher.rs:73— ClassTooLong — 536 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 4 blocks, lines 73-1077. The bar is 400 significant lines; this is 136 over it, 1.34× 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 reth/crates/rpc/rpc-engine-api/src/engine_api.rs:46— ClassTooLong — 531 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, 4 blocks, lines 46-957. The bar is 400 significant lines; this is 131 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.
ClassTooLong: BlockchainProvider reth/crates/storage/provider/src/providers/mod.rs:75— ClassTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 31 blocks, lines 75-946. The bar is 400 significant lines; this is 112 over it, 1.28× 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 reth/crates/transaction-pool/src/pool/txpool.rs:46— ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 5 blocks, lines 46-944. The bar is 400 significant lines; this is 74 over it, 1.19× 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 reth/crates/net/network/src/peers.rs:47— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 3 blocks, lines 47-946. The bar is 400 significant lines; this is 57 over it, 1.14× 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: Trick nomt/trickfs/src/lib.rs:318— ClassTooLong — 426 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, 3 blocks, lines 318-897. The bar is 400 significant lines; this is 26 over it, 1.07× 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: ReverseHeadersDownloader reth/crates/net/downloaders/src/headers/reverse_headers.rs:67— ClassTooLong — 423 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, 5 blocks, lines 67-884. The bar is 400 significant lines; this is 23 over it, 1.06× 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 reth/crates/transaction-pool/src/pool/mod.rs:134— ClassTooLong — 417 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 55 methods, 3 blocks, lines 134-876. The bar is 400 significant lines; this is 17 over it, 1.04× 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 reth/crates/rpc/rpc/src/trace.rs:45— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 6 blocks, lines 45-686. The bar is 400 significant lines; this is 4 over it, 1.01× 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: EngineNodeLauncher.launch_node reth/crates/node/builder/src/launch/engine.rs:86— MethodTooLong — launch_node runs 236 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 136 over it, 2.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: DefaultNodeLauncher.launch_node reth/crates/node/builder/src/launch/mod.rs:121— MethodTooLong — launch_node runs 236 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 136 over it, 2.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: NetworkManager.on_swarm_event reth/crates/net/network/src/manager.rs:649— MethodTooLong — on_swarm_event runs 185 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 85 over it, 1.85× 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 reth/crates/net/network/src/session/mod.rs:381— MethodTooLong — poll runs 169 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 69 over it, 1.69× 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: EthTransactionValidatorInner.validate_one reth/crates/transaction-pool/src/validate/eth.rs:155— MethodTooLong — validate_one runs 159 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 59 over it, 1.59× 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: EthBundle.call_bundle reth/crates/rpc/rpc/src/eth/bundle.rs:55— MethodTooLong — call_bundle 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: LoadPendingBlock.build_block reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:223— MethodTooLong — build_block runs 142 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 42 over it, 1.42× 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 reth/crates/cli/commands/src/db/stats.rs:146— MethodTooLong — static_files_stats_table runs 140 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 40 over it, 1.40× 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: DebugApi.debug_trace_call reth/crates/rpc/rpc/src/debug.rs:295— MethodTooLong — debug_trace_call runs 135 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 35 over it, 1.35× 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: InvalidBlockWitnessHook.on_invalid_block reth/crates/engine/invalid-block-hooks/src/witness.rs:59— MethodTooLong — on_invalid_block 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.
MethodTooLong: BlockchainTree.make_canonical reth/crates/blockchain-tree/src/blockchain_tree.rs:1021— MethodTooLong — make_canonical 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: RpcServerConfig.start reth/crates/rpc/rpc-builder/src/lib.rs:1450— MethodTooLong — start runs 123 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 23 over it, 1.23× 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.on_new_pooled_transaction_hashes reth/crates/net/network/src/transactions/mod.rs:611— MethodTooLong — on_new_pooled_transaction_hashes 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.
MethodTooLong: EthStateCacheService.poll reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:417— MethodTooLong — poll runs 117 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 17 over it, 1.17× 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 reth/crates/stages/stages/src/stages/execution.rs:197— MethodTooLong — execute runs 117 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 17 over it, 1.17× 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: Store.open nomt/nomt/src/store/mod.rs:56— MethodTooLong — open runs 111 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 11 over it, 1.11× 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: BeaconConsensusEngine.on_blockchain_tree_action reth/crates/consensus/beacon/src/engine/mod.rs:1602— MethodTooLong — on_blockchain_tree_action runs 111 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 11 over it, 1.11× 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: ParallelStateRoot.calculate reth/crates/trie/parallel/src/parallel_root.rs:74— MethodTooLong — calculate runs 103 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 3 over it, 1.03× 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.insert_block reth/crates/storage/provider/src/providers/database/provider.rs:3365— MethodTooLong — insert_block runs 101 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 1 over it, 1.01× 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.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×18
Edited copy of a member (10 corresponding lines) reth/crates/rpc/rpc/src/otterscan.rs:168— reth/crates/rpc/rpc/src/otterscan.rs:168-178 | reth/crates/rpc/rpc/src/otterscan.rs:181-190 — 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) reth/crates/net/ecies/src/mac.rs:53— reth/crates/net/ecies/src/mac.rs:53-62 | reth/crates/net/ecies/src/mac.rs:65-76 — 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) reth/crates/net/network/src/transactions/mod.rs:1550— reth/crates/net/network/src/transactions/mod.rs:1550-1559 | reth/crates/net/network/src/transactions/mod.rs:1569-1578 — 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/qmdb-common/src/merkletree/activebitsutil.rs:8— crates/qmdb-common/src/merkletree/activebitsutil.rs:8-17 | crates/qmdb-common/src/merkletree/activebitsutil.rs:21-30 — 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) reth/crates/evm/src/builder.rs:44— reth/crates/evm/src/builder.rs:44-53 | reth/crates/evm/src/builder.rs:60-71 — 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) reth/crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs:52— reth/crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs:52-61 | reth/crates/rpc/rpc/src/reth.rs:46-55 — 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) reth/crates/net/network/src/peers.rs:166— reth/crates/net/network/src/peers.rs:166-175 | reth/crates/net/network/src/peers.rs:178-190 — 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) reth/crates/stages/stages/src/stages/hashing_account.rs:255— reth/crates/stages/stages/src/stages/hashing_account.rs:255-264 | reth/crates/stages/stages/src/stages/hashing_storage.rs:190-199 — 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) reth/crates/ethereum/node/src/node.rs:58— reth/crates/ethereum/node/src/node.rs:58-67 | reth/crates/exex/test-utils/src/lib.rs:147-156 — 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) reth/crates/ethereum/evm/src/execute.rs:382— reth/crates/ethereum/evm/src/execute.rs:382-391 | reth/crates/ethereum/evm/src/execute.rs:400-412 — 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) reth/crates/primitives/src/transaction/mod.rs:354— reth/crates/primitives/src/transaction/mod.rs:354-365 | reth/crates/primitives/src/transaction/mod.rs:371-380 — 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/qmdb-common/src/merkletree/activebits.rs:25— crates/qmdb-common/src/merkletree/activebits.rs:25-34 | crates/qmdb-common/src/merkletree/activebits.rs:43-52 — 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) reth/crates/net/network/src/manager.rs:419— reth/crates/net/network/src/manager.rs:419-428 | reth/crates/net/network/src/session/mod.rs:347-362 — 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) reth/crates/storage/provider/src/test_utils/mock.rs:563— reth/crates/storage/provider/src/test_utils/mock.rs:563-572 | reth/crates/storage/storage-api/src/block.rs:244-255 — 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) reth/crates/storage/db-api/src/models/accounts.rs:54— reth/crates/storage/db-api/src/models/accounts.rs:54-63 | reth/crates/storage/db-api/src/models/accounts.rs:85-94 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:993— reth/crates/storage/provider/src/providers/database/provider.rs:993-1002 | reth/crates/storage/provider/src/providers/database/provider.rs:1009-1018 — 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/qmdb-common/src/indexer/utils/poslist.rs:61— crates/qmdb-common/src/indexer/utils/poslist.rs:61-70 | crates/qmdb/src/utils/shortlist.rs:167-176 — 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) reth/crates/storage/provider/src/test_utils/mock.rs:241— reth/crates/storage/provider/src/test_utils/mock.rs:241-250 | reth/crates/storage/provider/src/test_utils/mock.rs:263-272 — 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 (10 lines × 2) nomt/nomt/src/seglog/mod.rs:277— nomt/nomt/src/seglog/mod.rs:277-286 | nomt/nomt/src/seglog/mod.rs:333-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. 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 (10 lines × 2) nomt/torture/src/supervisor/workload.rs:981— nomt/torture/src/supervisor/workload.rs:981-990 | nomt/torture/src/supervisor/workload.rs:1004-1013 — 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) reth/book/sources/exex/hello-world/src/bin/2.rs:11— reth/book/sources/exex/hello-world/src/bin/2.rs:11-20 | reth/book/sources/exex/hello-world/src/bin/3.rs:30-39 — 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) reth/crates/config/src/config.rs:39— reth/crates/config/src/config.rs:39-48 | reth/crates/node/core/src/node_config.rs:406-415 — 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 `reth/crates/config/src/config.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 (10 lines × 2) reth/crates/consensus/beacon/src/engine/mod.rs:368— reth/crates/consensus/beacon/src/engine/mod.rs:368-377 | reth/crates/engine/tree/src/tree/mod.rs:2455-2464 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/mod.rs` and `reth/crates/engine/tree/src/tree/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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 (10 lines × 2) reth/crates/consensus/beacon/src/engine/sync.rs:308— reth/crates/consensus/beacon/src/engine/sync.rs:308-317 | reth/crates/engine/tree/src/download.rs:207-216 — 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 `reth/crates/consensus/beacon/src/engine/sync.rs:308` 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 `self` to `crate) fn poll(&mut` in one and `&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 (10 lines × 2) reth/crates/consensus/common/src/validation.rs:110— reth/crates/consensus/common/src/validation.rs:110-119 | reth/crates/optimism/consensus/src/lib.rs:126-135 — 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 (10 lines × 2) reth/crates/ethereum/payload/src/lib.rs:103— reth/crates/ethereum/payload/src/lib.rs:103-112 | reth/crates/optimism/payload/src/builder.rs:132-141 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 (10 lines × 2) reth/crates/net/network/src/session/active.rs:307— reth/crates/net/network/src/session/active.rs:307-316 | reth/crates/net/network/src/session/active.rs:333-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 `reth/crates/net/network/src/session/active.rs:307` 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) reth/crates/primitives/src/transaction/compat.rs:36— reth/crates/primitives/src/transaction/compat.rs:36-45 | reth/crates/primitives/src/transaction/compat.rs:50-59 — 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 `reth/crates/primitives/src/transaction/compat.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 (10 lines × 2) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1530— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1530-1539 | reth/crates/storage/provider/src/providers/mod.rs:864-873 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 `reth/crates/storage/provider/src/providers/blockchain_provider.rs:1530` 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) reth/crates/trie/common/src/proofs.rs:40— reth/crates/trie/common/src/proofs.rs:40-49 | reth/crates/trie/common/src/proofs.rs:108-117 — 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 `reth/crates/trie/common/src/proofs.rs:40` 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) reth/crates/config/src/config.rs:242— reth/crates/config/src/config.rs:242-251 | reth/crates/stages/types/src/execution.rs:23-32 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1559— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1559-1568 | reth/crates/storage/provider/src/providers/mod.rs:893-902 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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) reth/crates/consensus/beacon/src/engine/mod.rs:687— reth/crates/consensus/beacon/src/engine/mod.rs:687-696 | reth/crates/engine/tree/src/tree/mod.rs:1867-1876 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/mod.rs` and `reth/crates/engine/tree/src/tree/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 `reth/crates/consensus/beacon/src/engine/mod.rs:687` 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) bench/src/speed/eth_replay.rs:119— bench/src/speed/eth_replay.rs:119-128 | bench/src/speed/eth_replay.rs:175-184 — 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 `bench/src/speed/eth_replay.rs:119` 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) bench/src/speed/streaming_gen.rs:298— bench/src/speed/streaming_gen.rs:298-307 | bench/src/speed/streaming_gen.rs:325-334 — 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 `bench/src/speed/streaming_gen.rs:298` 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) crates/qmdb-common/src/merkletree/activebitsutil.rs:9— crates/qmdb-common/src/merkletree/activebitsutil.rs:9-14 | crates/qmdb-common/src/merkletree/activebitsutil.rs:22-27 — 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/qmdb-common/src/utils/short_key.rs:114— crates/qmdb-common/src/utils/short_key.rs:114-119 | crates/qmdb-common/src/utils/short_key.rs:130-135 — 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) nomt/nomt/src/merkle/page_walker.rs:261— nomt/nomt/src/merkle/page_walker.rs:261-266 | nomt/nomt/src/merkle/page_walker.rs:291-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 (6 lines × 2) reth/crates/ethereum/evm/src/execute.rs:152— reth/crates/ethereum/evm/src/execute.rs:152-157 | reth/crates/optimism/evm/src/execute.rs:148-153 — before extracting anything, compare `reth/crates/ethereum/evm/src/execute.rs` and `reth/crates/optimism/evm/src/execute.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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 `reth/crates/ethereum/evm/src/execute.rs:152` 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) reth/crates/primitives/src/transaction/compat.rs:19— reth/crates/primitives/src/transaction/compat.rs:19-24 | reth/crates/primitives/src/transaction/compat.rs:33-38 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:169— reth/crates/storage/provider/src/providers/blockchain_provider.rs:169-174 | reth/crates/storage/provider/src/providers/database/provider.rs:847-853 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 `reth/crates/storage/provider/src/providers/blockchain_provider.rs:169` 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 (6 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:2003— reth/crates/storage/provider/src/providers/database/provider.rs:2003-2008 | reth/crates/storage/provider/src/providers/database/provider.rs:2088-2093 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:2003` 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 (6 lines × 2) reth/crates/cli/commands/src/db/stats.rs:218— reth/crates/cli/commands/src/db/stats.rs:218-223 | reth/crates/cli/commands/src/db/stats.rs:279-284 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1552— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1552-1557 | reth/crates/storage/provider/src/providers/mod.rs:886-891 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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) reth/crates/storage/storage-api/src/block_hash.rs:17— reth/crates/storage/storage-api/src/block_hash.rs:17-22 | reth/crates/storage/storage-api/src/block_id.rs:36-41 — 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 `reth/crates/storage/storage-api/src/block_hash.rs:17` 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) reth/crates/transaction-pool/src/blobstore/noop.rs:46— reth/crates/transaction-pool/src/blobstore/noop.rs:46-51 | reth/crates/transaction-pool/src/noop.rs:256-261 — 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 `reth/crates/transaction-pool/src/noop.rs:256` 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) reth/crates/stages/stages/src/stages/hashing_account.rs:287— reth/crates/stages/stages/src/stages/hashing_account.rs:287-292 | reth/crates/stages/stages/src/stages/hashing_storage.rs:201-206 — before extracting anything, compare `reth/crates/stages/stages/src/stages/hashing_account.rs` and `reth/crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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) reth/crates/optimism/evm/src/l1.rs:89— reth/crates/optimism/evm/src/l1.rs:89-94 | reth/crates/optimism/evm/src/l1.rs:149-154 — 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 `reth/crates/optimism/evm/src/l1.rs:89` 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) bench/src/speed/reth_adapter.rs:153— bench/src/speed/reth_adapter.rs:153-161 | bench/src/speed/reth_adapter.rs:346-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. Read the line range as the matched WINDOW rather than a finished unit: at `bench/src/speed/reth_adapter.rs:153` 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) reth/crates/storage/provider/src/test_utils/blocks.rs:227— reth/crates/storage/provider/src/test_utils/blocks.rs:227-232 | reth/crates/storage/provider/src/test_utils/blocks.rs:291-297 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:227` 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 `number` to `BlockNumber) -> (SealedBlockWithSenders` in one and `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 (6 lines × 2) reth/crates/storage/provider/src/test_utils/mock.rs:199— reth/crates/storage/provider/src/test_utils/mock.rs:199-204 | reth/crates/storage/provider/src/test_utils/mock.rs:533-538 — 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 `reth/crates/storage/provider/src/test_utils/mock.rs:199` 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 `range` to `impl RangeBounds<BlockNumber>` in one and `RangeInclusive<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 (6 lines × 2) bench/src/speed/lvmt_adapter.rs:108— bench/src/speed/lvmt_adapter.rs:108-113 | bench/src/speed/lvmt_adapter.rs:177-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 `bench/src/speed/lvmt_adapter.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.
TooManyMethods: EngineApiTreeHandler reth/crates/engine/tree/src/tree/mod.rs:466— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PoolInner reth/crates/transaction-pool/src/pool/mod.rs:134— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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 reth/crates/node/builder/src/launch/common.rs:203— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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 reth/crates/net/discv4/src/lib.rs:424— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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 reth/crates/net/network/src/peers.rs:47— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: BlockchainTree reth/crates/blockchain-tree/src/blockchain_tree.rs:63— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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 reth/crates/chain-state/src/in_memory.rs:164— 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: Transaction reth/crates/primitives/src/transaction/mod.rs:87— 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: NetworkConfigBuilder reth/crates/net/network/src/config.rs:167— 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: TxPool reth/crates/transaction-pool/src/pool/txpool.rs:46— 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: BeaconConsensusEngine reth/crates/consensus/beacon/src/engine/mod.rs:175— 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: Cursor reth/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 reth/crates/net/network/src/manager.rs:79— 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: Workload nomt/torture/src/supervisor/workload.rs:102— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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: RpcRegistryInner reth/crates/rpc/rpc-builder/src/lib.rs:695— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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 reth/crates/storage/provider/src/providers/database/provider.rs:130— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
Duplicated block (11 lines × 2) reth/crates/consensus/beacon/src/engine/mod.rs:780— reth/crates/consensus/beacon/src/engine/mod.rs:780-790 | reth/crates/engine/tree/src/tree/mod.rs:1662-1672 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/mod.rs` and `reth/crates/engine/tree/src/tree/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 `reth/crates/consensus/beacon/src/engine/mod.rs:780` 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) reth/crates/ethereum/evm/src/execute.rs:166— reth/crates/ethereum/evm/src/execute.rs:166-176 | reth/crates/optimism/evm/src/execute.rs:183-193 — before extracting anything, compare `reth/crates/ethereum/evm/src/execute.rs` and `reth/crates/optimism/evm/src/execute.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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 (11 lines × 2) reth/crates/ethereum/evm/src/execute.rs:258— reth/crates/ethereum/evm/src/execute.rs:258-268 | reth/crates/optimism/evm/src/execute.rs:275-285 — before extracting anything, compare `reth/crates/ethereum/evm/src/execute.rs` and `reth/crates/optimism/evm/src/execute.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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.
Duplicated block (11 lines × 2) reth/crates/net/ecies/src/codec.rs:59— reth/crates/net/ecies/src/codec.rs:59-69 | reth/crates/net/ecies/src/codec.rs:78-88 — 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) reth/crates/storage/nippy-jar/src/cursor.rs:90— reth/crates/storage/nippy-jar/src/cursor.rs:90-100 | reth/crates/storage/nippy-jar/src/cursor.rs:131-141 — 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 `reth/crates/storage/nippy-jar/src/cursor.rs:90` 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) reth/crates/storage/provider/src/providers/database/provider.rs:878— reth/crates/storage/provider/src/providers/database/provider.rs:878-888 | reth/crates/storage/provider/src/providers/database/provider.rs:2706-2716 — 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) reth/crates/transaction-pool/src/pool/pending.rs:188— reth/crates/transaction-pool/src/pool/pending.rs:188-198 | reth/crates/transaction-pool/src/pool/pending.rs:231-241 — 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 `reth/crates/transaction-pool/src/pool/pending.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/transaction-pool/src/pool/pending.rs:243` calls `priority` and `reth/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 (11 lines × 2) reth/crates/trie/trie/src/trie_cursor/in_memory.rs:138— reth/crates/trie/trie/src/trie_cursor/in_memory.rs:138-148 | reth/crates/trie/trie/src/trie_cursor/in_memory.rs:268-278 — 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) reth/crates/chainspec/src/spec.rs:648— reth/crates/chainspec/src/spec.rs:648-658 | reth/crates/optimism/chainspec/src/lib.rs:203-213 — 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 (11 lines × 2) reth/crates/consensus/beacon/src/engine/sync.rs:205— reth/crates/consensus/beacon/src/engine/sync.rs:205-215 | reth/crates/engine/tree/src/backfill.rs:120-130 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/sync.rs` and `reth/crates/engine/tree/src/backfill.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn set_pipeline_sync_target(&mut` in one and `&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) reth/crates/engine/tree/src/tree/mod.rs:2364— reth/crates/engine/tree/src/tree/mod.rs:2364-2374 | reth/crates/engine/tree/src/tree/mod.rs:2394-2404 — 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 `reth/crates/engine/tree/src/tree/mod.rs:2364` 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) reth/crates/net/eth-wire/src/p2pstream.rs:340— reth/crates/net/eth-wire/src/p2pstream.rs:340-350 | reth/crates/net/eth-wire/src/p2pstream.rs:594-604 — 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 `reth/crates/net/eth-wire/src/p2pstream.rs:340` 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) reth/crates/prune/prune/src/segments/receipts.rs:27— reth/crates/prune/prune/src/segments/receipts.rs:27-37 | reth/crates/prune/prune/src/segments/user/sender_recovery.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 `reth/crates/prune/prune/src/segments/receipts.rs:27` 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) reth/crates/prune/prune/src/segments/user/account_history.rs:116— reth/crates/prune/prune/src/segments/user/account_history.rs:116-126 | reth/crates/prune/prune/src/segments/user/storage_history.rs:121-131 — before extracting anything, compare `reth/crates/prune/prune/src/segments/user/account_history.rs` and `reth/crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `reth/crates/prune/prune/src/segments/user/account_history.rs:116` 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) bench/src/speed/streaming_gen.rs:445— bench/src/speed/streaming_gen.rs:445-455 | bench/src/speed/streaming_gen.rs:457-467 — 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 `bench/src/speed/streaming_gen.rs:445` 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×13
Edited copy of a member (9 corresponding lines) reth/crates/blockchain-tree-api/src/error.rs:186— reth/crates/blockchain-tree-api/src/error.rs:186-194 | reth/crates/blockchain-tree-api/src/error.rs:232-240 — 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) reth/crates/storage/provider/src/providers/static_file/manager.rs:1417— reth/crates/storage/provider/src/providers/static_file/manager.rs:1417-1430 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1459-1467 — 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) reth/crates/net/discv4/src/lib.rs:794— reth/crates/net/discv4/src/lib.rs:794-802 | reth/crates/net/dns/src/lib.rs:196-204 — 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) reth/crates/net/network/src/manager.rs:888— reth/crates/net/network/src/manager.rs:888-901 | reth/crates/net/network/src/manager.rs:906-914 — 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) reth/crates/storage/db/src/implementation/mdbx/cursor.rs:120— reth/crates/storage/db/src/implementation/mdbx/cursor.rs:120-128 | reth/crates/storage/db/src/implementation/mdbx/cursor.rs:148-157 — 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) reth/crates/storage/provider/src/providers/database/mod.rs:306— reth/crates/storage/provider/src/providers/database/mod.rs:306-314 | reth/crates/storage/provider/src/providers/database/provider.rs:1608-1618 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:1537— reth/crates/storage/provider/src/providers/database/provider.rs:1537-1545 | reth/crates/storage/provider/src/providers/database/mod.rs:251-259 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:2104— reth/crates/storage/provider/src/providers/database/provider.rs:2104-2112 | reth/crates/storage/provider/src/providers/database/mod.rs:497-505 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:1422— reth/crates/storage/provider/src/providers/database/provider.rs:1422-1430 | reth/crates/storage/provider/src/providers/database/provider.rs:1437-1447 — 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/qmdb-common/src/entryfile/entry.rs:607— crates/qmdb-common/src/entryfile/entry.rs:607-615 | crates/qmdb/src/utils/shortlist.rs:216-224 — 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) reth/crates/net/discv4/src/lib.rs:697— reth/crates/net/discv4/src/lib.rs:697-706 | reth/crates/net/dns/src/lib.rs:156-164 — 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) reth/crates/storage/provider/src/test_utils/mock.rs:196— reth/crates/storage/provider/src/test_utils/mock.rs:196-204 | reth/crates/storage/provider/src/test_utils/mock.rs:530-538 — 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) reth/crates/stages/stages/src/test_utils/test_db.rs:112— reth/crates/stages/stages/src/test_utils/test_db.rs:112-120 | reth/crates/stages/stages/src/test_utils/test_db.rs:132-141 — 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 (9 lines × 2) nomt/nomt/src/merkle/worker.rs:375— nomt/nomt/src/merkle/worker.rs:375-383 | nomt/nomt/src/merkle/worker.rs:433-441 — 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 `nomt/nomt/src/merkle/worker.rs:375` 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) nomt/trickfs/src/lib.rs:544— nomt/trickfs/src/lib.rs:544-552 | nomt/trickfs/src/lib.rs:692-700 — 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 lines × 2) reth/crates/ethereum/payload/src/lib.rs:382— reth/crates/ethereum/payload/src/lib.rs:382-390 | reth/crates/optimism/payload/src/builder.rs:475-483 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 (9 lines × 2) reth/crates/net/discv4/src/lib.rs:545— reth/crates/net/discv4/src/lib.rs:545-553 | reth/crates/net/network/src/network.rs:242-250 — 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) reth/crates/storage/nippy-jar/src/consistency.rs:62— reth/crates/storage/nippy-jar/src/consistency.rs:62-76 | reth/crates/storage/nippy-jar/src/consistency.rs:100-108 — 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 `reth/crates/storage/nippy-jar/src/consistency.rs:62` 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) nomt/core/src/page_id.rs:210— nomt/core/src/page_id.rs:210-218 | nomt/core/src/page_id.rs:227-235 — 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 `nomt/core/src/page_id.rs:210` 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1542— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1542-1550 | reth/crates/storage/provider/src/providers/mod.rs:876-884 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 (9 lines × 2) reth/crates/stages/stages/src/stages/hashing_account.rs:192— reth/crates/stages/stages/src/stages/hashing_account.rs:192-201 | reth/crates/stages/stages/src/stages/hashing_storage.rs:124-132 — before extracting anything, compare `reth/crates/stages/stages/src/stages/hashing_account.rs` and `reth/crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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) reth/crates/optimism/evm/src/l1.rs:94— reth/crates/optimism/evm/src/l1.rs:94-102 | reth/crates/optimism/evm/src/l1.rs:159-167 — 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 `reth/crates/optimism/evm/src/l1.rs:94` 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) reth/crates/exex/exex/src/backfill/job.rs:101— reth/crates/exex/exex/src/backfill/job.rs:101-109 | reth/crates/stages/stages/src/stages/execution.rs:268-276 — 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) reth/crates/storage/provider/src/test_utils/blocks.rs:314— reth/crates/storage/provider/src/test_utils/blocks.rs:314-322 | reth/crates/storage/provider/src/test_utils/blocks.rs:474-483 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:314` 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) bench/src/bin/speed.rs:990— bench/src/bin/speed.rs:990-998 | bench/src/bin/speed.rs:1449-1457 — 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) reth/crates/evm/src/builder.rs:46— reth/crates/evm/src/builder.rs:46-50 | reth/crates/evm/src/builder.rs:62-66 — 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) reth/crates/net/dns/src/lib.rs:398— reth/crates/net/dns/src/lib.rs:398-402 | reth/crates/net/peers/src/lib.rs:140-144 — 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 `reth/crates/net/dns/src/lib.rs:398` 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) reth/crates/net/network/src/fetch/mod.rs:275— reth/crates/net/network/src/fetch/mod.rs:275-280 | reth/crates/net/network/src/fetch/mod.rs:304-308 — 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 `reth/crates/net/network/src/fetch/mod.rs:275` 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 `res` to `RequestResult<Vec<Header>>` in one and `RequestResult<Vec<BlockBody>>` 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 (5 lines × 2) reth/crates/primitives/src/transaction/mod.rs:273— reth/crates/primitives/src/transaction/mod.rs:273-277 | reth/crates/primitives/src/transaction/mod.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. Read the line range as the matched WINDOW rather than a finished unit: at `reth/crates/primitives/src/transaction/mod.rs:273` 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) reth/crates/storage/provider/src/providers/database/provider.rs:1049— reth/crates/storage/provider/src/providers/database/provider.rs:1049-1053 | reth/crates/storage/provider/src/providers/database/provider.rs:1104-1108 — 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) reth/crates/transaction-pool/src/pool/txpool.rs:712— reth/crates/transaction-pool/src/pool/txpool.rs:712-716 | reth/crates/transaction-pool/src/pool/txpool.rs:736-740 — 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 `reth/crates/transaction-pool/src/pool/txpool.rs:712` 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) reth/crates/net/p2p/src/bodies/client.rs:58— reth/crates/net/p2p/src/bodies/client.rs:58-62 | reth/crates/net/p2p/src/headers/client.rs:82-86 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1280— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1280-1284 | reth/crates/storage/provider/src/providers/database/provider.rs:2206-2210 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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) reth/crates/storage/provider/src/providers/static_file/jar.rs:279— reth/crates/storage/provider/src/providers/static_file/jar.rs:279-283 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1515-1519 — 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 `reth/crates/storage/provider/src/providers/static_file/jar.rs:279` 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) reth/crates/net/discv4/src/lib.rs:709— reth/crates/net/discv4/src/lib.rs:709-713 | reth/crates/net/dns/src/lib.rs:187-191 — 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) nomt/nomt/src/beatree/ops/bit_ops.rs:290— nomt/nomt/src/beatree/ops/bit_ops.rs:290-294 | nomt/nomt/src/beatree/ops/bit_ops.rs:376-380 — 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 `nomt/nomt/src/beatree/ops/bit_ops.rs:290` 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) bench/src/speed/hover_gen.rs:72— bench/src/speed/hover_gen.rs:72-76 | bench/src/speed/test_gen.rs:313-318 — 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 `bench/src/speed/hover_gen.rs:72` 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.
X18 · Disposal-pattern correctness· Explicit release owed and not made on every path · ×12
Explicit release owed and not made on every path reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:264— `system_caller` (line 264) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:201— `system_caller` (line 201) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:334— `system_caller` (line 334) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/optimism/payload/src/builder.rs:204— `system_caller` (line 204) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/optimism/evm/src/execute.rs:126— `system_caller` (line 126) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/node/builder/src/launch/engine.rs:315— `rpc_consensus_client` (line 315) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/node/builder/src/launch/mod.rs:404— `rpc_consensus_client` (line 404) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/node/builder/src/launch/mod.rs:417— `rpc_consensus_client` (line 417) is a `DebugConsensusClient` this function owns and never releases: no `run()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `DebugConsensusClient` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/ethereum/payload/src/lib.rs:163— `system_caller` (line 163) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/ethereum/evm/src/execute.rs:146— `system_caller` (line 146) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/engine/util/src/reorg.rs:289— `system_caller` (line 289) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
Explicit release owed and not made on every path reth/crates/engine/invalid-block-hooks/src/witness.rs:87— `system_caller` (line 87) is a `SystemCaller` this function owns and never releases: no `finish()` on any path, and it is not handed on. Rust drops it at the end of the scope, and `SystemCaller` has no `Drop`, so what it holds is only completed by that call and is lost without it. Release it where the work ends.
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 (17 corresponding lines) · ×11
Edited copy of a member (17 corresponding lines) reth/crates/net/p2p/src/full_block.rs:275— reth/crates/net/p2p/src/full_block.rs:275-291 | reth/crates/net/p2p/src/full_block.rs:679-695 — 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) reth/crates/trie/trie/src/hashed_cursor/post_state.rs:236— reth/crates/trie/trie/src/hashed_cursor/post_state.rs:236-258 | reth/crates/trie/trie/src/trie_cursor/in_memory.rs:229-245 — 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) reth/crates/transaction-pool/src/pool/txpool.rs:708— reth/crates/transaction-pool/src/pool/txpool.rs:708-724 | reth/crates/transaction-pool/src/pool/txpool.rs:732-748 — 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) nomt/benchtop/src/custom_workload.rs:15— nomt/benchtop/src/custom_workload.rs:15-31 | nomt/benchtop/src/transfer_workload.rs:15-31 — 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) nomt/nomt/src/beatree/ops/update/branch_stage.rs:480— nomt/nomt/src/beatree/ops/update/branch_stage.rs:480-498 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:711-727 — 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) reth/crates/ethereum/consensus/src/validation.rs:61— reth/crates/ethereum/consensus/src/validation.rs:61-77 | reth/crates/optimism/consensus/src/validation.rs:53-70 — 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) reth/crates/ethereum/evm/src/lib.rs:107— reth/crates/ethereum/evm/src/lib.rs:107-123 | reth/crates/optimism/evm/src/lib.rs:111-128 — 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) reth/crates/net/network/src/error.rs:207— reth/crates/net/network/src/error.rs:207-223 | reth/crates/net/network/src/error.rs:225-241 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1473— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1473-1489 | reth/crates/storage/provider/src/providers/mod.rs:816-832 — 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) reth/crates/chainspec/src/spec.rs:341— reth/crates/chainspec/src/spec.rs:341-357 | reth/crates/chainspec/src/spec.rs:360-376 — 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) reth/crates/storage/provider/src/test_utils/mock.rs:341— reth/crates/storage/provider/src/test_utils/mock.rs:341-357 | reth/crates/storage/provider/src/test_utils/mock.rs:362-378 — 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.
Duplicated block (7 lines × 2) nomt/nomt/src/store/mod.rs:89— nomt/nomt/src/store/mod.rs:89-95 | nomt/nomt/src/store/mod.rs:117-123 — 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 `nomt/nomt/src/store/mod.rs:89` 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) reth/crates/static-file/static-file/src/segments/receipts.rs:31— reth/crates/static-file/static-file/src/segments/receipts.rs:31-37 | reth/crates/static-file/static-file/src/segments/transactions.rs:33-41 — 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 `reth/crates/static-file/static-file/src/segments/receipts.rs:31` 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 (7 lines × 2) reth/crates/trie/db/src/state.rs:197— reth/crates/trie/db/src/state.rs:197-203 | reth/crates/trie/db/src/state.rs:211-217 — 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) reth/crates/trie/trie/src/proof.rs:108— reth/crates/trie/trie/src/proof.rs:108-114 | reth/crates/trie/trie/src/proof.rs:235-241 — 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 `reth/crates/trie/trie/src/proof.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 (7 lines × 2) reth/crates/storage/provider/src/providers/blockchain_provider.rs:663— reth/crates/storage/provider/src/providers/blockchain_provider.rs:663-669 | reth/crates/storage/provider/src/providers/database/provider.rs:1514-1520 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 (7 lines × 2) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1264— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1264-1270 | reth/crates/storage/provider/src/providers/database/provider.rs:2190-2196 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 (7 lines × 2) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1294— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1294-1300 | reth/crates/storage/provider/src/providers/database/provider.rs:2220-2226 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 (7 lines × 2) reth/crates/transaction-pool/src/pool/parked.rs:159— reth/crates/transaction-pool/src/pool/parked.rs:159-165 | reth/crates/transaction-pool/src/pool/pending.rs:507-513 — 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 `reth/crates/transaction-pool/src/pool/parked.rs:159` 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 (7 lines × 2) reth/crates/ethereum/evm/src/execute.rs:67— reth/crates/ethereum/evm/src/execute.rs:67-73 | reth/crates/optimism/evm/src/execute.rs:60-66 — before extracting anything, compare `reth/crates/ethereum/evm/src/execute.rs` and `reth/crates/optimism/evm/src/execute.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `chain_spec` to `Arc<ChainSpec>` in one and `Arc<OpChainSpec>` 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) reth/crates/storage/provider/src/test_utils/mock.rs:342— reth/crates/storage/provider/src/test_utils/mock.rs:342-348 | reth/crates/storage/provider/src/test_utils/mock.rs:363-369 — 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 `reth/crates/storage/provider/src/test_utils/mock.rs:342` 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) bench/src/speed/test_helper.rs:13— bench/src/speed/test_helper.rs:13-19 | bench/src/speed/test_helper.rs:39-45 — 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 `bench/src/speed/test_helper.rs:13` 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.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/bin/reth-bench/src/valid_payload.rs:219— `call_new_payload` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/bin/reth-bench/src/valid_payload.rs:264— `call_forkchoice_updated` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/net/discv5/src/lib.rs:351— `try_into_reachable` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/node/builder/src/launch/common.rs:910— `invalid_block_hook` does real work, but one of its branches is `bail!` with a "not implemented" message — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/codecs/derive/src/compact/mod.rs:80— `get_fields` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/codecs/derive/src/compact/mod.rs:102— `get_fields` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/codecs/derive/src/compact/mod.rs:114— `load_field` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/codecs/derive/src/compact/mod.rs:119— `load_field` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/codecs/derive/src/compact/structs.rs:157— `from` does real work, but one of its branches is `todo!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
Unfinished branch — a todo!() / unimplemented!() arm in a real function reth/crates/storage/db/src/static_file/cursor.rs:43— `get` does real work, but one of its branches is `unimplemented!` — a case that was never written, and a panic the first time it is reached. Implement the case, or return an error that says why it is not handled.
DatabaseProvider::get_block_range (cognitive 27) reth/crates/storage/provider/src/providers/database/provider.rs:713— DatabaseProvider::get_block_range has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 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. This shape REPEATS in the file: one other method here (DatabaseProvider::take_block_range) 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.
DatabaseProvider::take_block_range (cognitive 27) reth/crates/storage/provider/src/providers/database/provider.rs:1206— DatabaseProvider::take_block_range has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 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. This shape REPEATS in the file: one other method here (DatabaseProvider::get_block_range) 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.
DatabaseProvider::take_state (cognitive 22) reth/crates/storage/provider/src/providers/database/provider.rs:2634— DatabaseProvider::take_state has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 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.
DatabaseProvider::write_state_reverts (cognitive 21) reth/crates/storage/provider/src/providers/database/provider.rs:2353— DatabaseProvider::write_state_reverts has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 2 (7 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.
DatabaseProvider::write_state_changes (cognitive 21) reth/crates/storage/provider/src/providers/database/provider.rs:2421— DatabaseProvider::write_state_changes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (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.
DatabaseProvider::write_hashed_state (cognitive 20) reth/crates/storage/provider/src/providers/database/provider.rs:2482— DatabaseProvider::write_hashed_state has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 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.
DatabaseProvider::block_range (cognitive 19) reth/crates/storage/provider/src/providers/database/provider.rs:498— DatabaseProvider::block_range has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), 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.
DatabaseProvider::take_block_transaction_range (cognitive 17) reth/crates/storage/provider/src/providers/database/provider.rs:1083— DatabaseProvider::take_block_transaction_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), match/switch 1 (3 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.
DatabaseProvider::remove_state (cognitive 16) reth/crates/storage/provider/src/providers/database/provider.rs:2542— DatabaseProvider::remove_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×9
Edited copy of a member (15 corresponding lines) nomt/core/src/page_id.rs:209— nomt/core/src/page_id.rs:209-223 | nomt/core/src/page_id.rs:226-240 — 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) reth/crates/ethereum/payload/src/lib.rs:102— reth/crates/ethereum/payload/src/lib.rs:102-116 | reth/crates/optimism/payload/src/builder.rs:131-145 — 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) reth/crates/transaction-pool/src/pool/blob.rs:45— reth/crates/transaction-pool/src/pool/blob.rs:45-59 | reth/crates/transaction-pool/src/pool/parked.rs:58-76 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:938— reth/crates/consensus/beacon/src/engine/mod.rs:938-952 | reth/crates/consensus/beacon/src/engine/mod.rs:958-974 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:776— reth/crates/consensus/beacon/src/engine/mod.rs:776-790 | reth/crates/engine/tree/src/tree/mod.rs:1658-1672 — 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) reth/crates/storage/provider/src/providers/state/historical.rs:133— reth/crates/storage/provider/src/providers/state/historical.rs:133-149 | reth/crates/storage/provider/src/providers/state/historical.rs:152-166 — 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) reth/crates/storage/provider/src/providers/static_file/metrics.rs:68— reth/crates/storage/provider/src/providers/static_file/metrics.rs:68-82 | reth/crates/storage/provider/src/providers/static_file/metrics.rs:90-104 — 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) reth/crates/node/builder/src/builder/states.rs:50— reth/crates/node/builder/src/builder/states.rs:50-64 | reth/crates/node/builder/src/builder/states.rs:175-189 — 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) reth/crates/rpc/rpc-builder/src/lib.rs:1969— reth/crates/rpc/rpc-builder/src/lib.rs:1969-1983 | reth/crates/rpc/rpc-layer/src/auth_client_layer.rs:64-78 — 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 (12 corresponding lines) · ×9
Edited copy of a member (12 corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1491— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1491-1507 | reth/crates/storage/provider/src/providers/mod.rs:834-845 — 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) nomt/nomt/src/beatree/ops/bit_ops.rs:289— nomt/nomt/src/beatree/ops/bit_ops.rs:289-300 | nomt/nomt/src/beatree/ops/bit_ops.rs:375-386 — 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) reth/crates/net/downloaders/src/file_codec.rs:28— reth/crates/net/downloaders/src/file_codec.rs:28-39 | reth/crates/optimism/cli/src/receipt_file_codec.rs:33-47 — 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) reth/crates/net/downloaders/src/file_client.rs:453— reth/crates/net/downloaders/src/file_client.rs:453-464 | reth/crates/net/downloaders/src/file_client.rs:470-484 — 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) reth/crates/net/network/src/cache.rs:119— reth/crates/net/network/src/cache.rs:119-130 | reth/crates/net/network/src/cache.rs:148-162 — 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) reth/crates/net/network/src/fetch/client.rs:64— reth/crates/net/network/src/fetch/client.rs:64-75 | reth/crates/net/network/src/fetch/client.rs:86-97 — 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) reth/crates/engine/tree/src/tree/mod.rs:1693— reth/crates/engine/tree/src/tree/mod.rs:1693-1704 | reth/crates/consensus/beacon/src/engine/mod.rs:801-812 — 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) reth/crates/transaction-pool/src/pool/mod.rs:564— reth/crates/transaction-pool/src/pool/mod.rs:564-578 | reth/crates/transaction-pool/src/pool/mod.rs:581-592 — 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) reth/crates/storage/provider/src/test_utils/blocks.rs:126— reth/crates/storage/provider/src/test_utils/blocks.rs:126-137 | reth/crates/storage/provider/src/test_utils/blocks.rs:141-152 — 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×9
Edited copy of a member (8 corresponding lines) reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:84— reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:84-91 | reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:113-121 — 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) reth/crates/net/network/src/builder.rs:61— reth/crates/net/network/src/builder.rs:61-68 | reth/crates/net/network/src/builder.rs:74-81 — 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) reth/crates/storage/db/src/static_file/cursor.rs:76— reth/crates/storage/db/src/static_file/cursor.rs:76-83 | reth/crates/storage/db/src/static_file/cursor.rs:89-100 — 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) reth/crates/storage/provider/src/providers/static_file/manager.rs:1213— reth/crates/storage/provider/src/providers/static_file/manager.rs:1213-1225 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1239-1246 — 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) reth/crates/primitives/src/block.rs:738— reth/crates/primitives/src/block.rs:738-745 | reth/crates/primitives/src/block.rs:749-756 — 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) reth/crates/transaction-pool/src/pool/blob.rs:200— reth/crates/transaction-pool/src/pool/blob.rs:200-213 | reth/crates/transaction-pool/src/pool/parked.rs:279-286 — 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) reth/crates/stages/stages/src/stages/index_account_history.rs:133— reth/crates/stages/stages/src/stages/index_account_history.rs:133-141 | reth/crates/stages/stages/src/stages/index_storage_history.rs:139-146 — 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) reth/crates/blockchain-tree/src/metrics.rs:25— reth/crates/blockchain-tree/src/metrics.rs:25-32 | reth/crates/storage/provider/src/providers/database/metrics.rs:14-21 — 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) reth/crates/trie/trie/src/test_utils.rs:14— reth/crates/trie/trie/src/test_utils.rs:14-21 | reth/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.
Configuration option is read nowhere reth/crates/net/discv4/src/config.rs:23— `Discv4Config.enable_packet_filter` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/net/eth-wire-types/src/broadcast.rs:83— `NewBlock.td` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/net/network-types/src/session/config.rs:116— `SessionLimits.max_established_inbound` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/net/network-types/src/session/config.rs:118— `SessionLimits.max_established_outbound` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/node/core/src/args/benchmark_args.rs:34— `BenchmarkArgs.engine_rpc_url` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/node/core/src/args/network.rs:68— `NetworkArgs.dns_retries` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/optimism/node/src/args.rs:24— `RollupArgs.enable_genesis_walkback` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/storage/codecs/src/alloy/transaction/eip4844.rs:28— `TxEip4844.placeholder` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere reth/crates/storage/codecs/src/alloy/withdrawal.rs:16— `Withdrawal.validator_index` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
nomt::io::linux::run_worker (cognitive 46) nomt/nomt/src/io/linux.rs:71— nomt::io::linux::run_worker has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 4 (15 pts), loops 4 (8 pts), boolean chains 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.
nomt::beatree::ops::bit_ops::bitwise_memcpy (cognitive 35) nomt/nomt/src/beatree/ops/bit_ops.rs:124— nomt::beatree::ops::bit_ops::bitwise_memcpy has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 3 (5 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.
nomt::merkle::worker::warm_up_phase (cognitive 31) nomt/nomt/src/merkle/worker.rs:119— nomt::merkle::worker::warm_up_phase has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 3 (9 pts), loops 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.
nomt::beatree::ops::update::branch_updater::build_branch (cognitive 28) nomt/nomt/src/beatree/ops/update/branch_updater.rs:232— nomt::beatree::ops::update::branch_updater::build_branch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 3 (8 pts), loops 3 (4 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.
nomt::beatree::ops::update::extend_range_protocol::try_answer_left_neighbor (cognitive 25) nomt/nomt/src/beatree/ops/update/extend_range_protocol.rs:49— nomt::beatree::ops::update::extend_range_protocol::try_answer_left_neighbor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, match/switch 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.
nomt::beatree::ops::update::leaf_stage::run_worker (cognitive 18) nomt/nomt/src/beatree/ops/update/leaf_stage.rs:553— nomt::beatree::ops::update::leaf_stage::run_worker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), match/switch 2 (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.
nomt::beatree::ops::update::branch_stage::run_worker (cognitive 16) nomt/nomt/src/beatree/ops/update/branch_stage.rs:341— nomt::beatree::ops::update::branch_stage::run_worker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), 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.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×7
Edited copy of a member (21 corresponding lines) reth/crates/engine/util/src/skip_fcu.rs:42— reth/crates/engine/util/src/skip_fcu.rs:42-62 | reth/crates/engine/util/src/skip_new_payload.rs:38-65 — 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) reth/crates/transaction-pool/src/blobstore/disk.rs:135— reth/crates/transaction-pool/src/blobstore/disk.rs:135-155 | reth/crates/transaction-pool/src/blobstore/mem.rs:120-140 — 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) reth/crates/consensus/beacon/src/engine/sync.rs:261— reth/crates/consensus/beacon/src/engine/sync.rs:261-285 | reth/crates/engine/tree/src/backfill.rs:134-154 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1141— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1141-1168 | reth/crates/storage/provider/src/providers/mod.rs:470-490 — 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) reth/crates/ethereum/evm/src/execute.rs:444— reth/crates/ethereum/evm/src/execute.rs:444-467 | reth/crates/optimism/evm/src/execute.rs:466-486 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:367— reth/crates/consensus/beacon/src/engine/mod.rs:367-387 | reth/crates/engine/tree/src/tree/mod.rs:2454-2474 — 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) nomt/nomt/src/beatree/ops/overflow.rs:181— nomt/nomt/src/beatree/ops/overflow.rs:181-201 | nomt/nomt/src/beatree/ops/overflow.rs:304-324 — 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 (14 corresponding lines) · ×7
Edited copy of a member (14 corresponding lines) reth/crates/storage/provider/src/providers/database/provider.rs:1402— reth/crates/storage/provider/src/providers/database/provider.rs:1402-1415 | reth/crates/storage/provider/src/providers/database/provider.rs:2332-2349 — 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) bench/src/speed/nomt_adapter.rs:89— bench/src/speed/nomt_adapter.rs:89-102 | nomt/benchtop/src/nomt.rs:248-263 — 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) reth/crates/exex/exex/src/notifications.rs:61— reth/crates/exex/exex/src/notifications.rs:61-74 | reth/crates/exex/exex/src/notifications.rs:89-105 — 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) nomt/benchtop/src/timer.rs:133— nomt/benchtop/src/timer.rs:133-146 | nomt/nomt/src/metrics.rs:151-164 — 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) nomt/nomt/src/beatree/branch/node.rs:124— nomt/nomt/src/beatree/branch/node.rs:124-137 | nomt/nomt/src/beatree/branch/node.rs:235-248 — 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) nomt/nomt/src/beatree/branch/node.rs:183— nomt/nomt/src/beatree/branch/node.rs:183-196 | nomt/nomt/src/beatree/branch/node.rs:325-338 — 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) reth/crates/storage/provider/src/providers/database/mod.rs:236— reth/crates/storage/provider/src/providers/database/mod.rs:236-249 | reth/crates/storage/provider/src/providers/database/provider.rs:1522-1535 — 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) reth/crates/primitives/src/transaction/mod.rs:608— reth/crates/primitives/src/transaction/mod.rs:608-618 | reth/crates/primitives/src/transaction/mod.rs:810-820 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:3601— reth/crates/storage/provider/src/providers/database/provider.rs:3601-3611 | reth/crates/storage/provider/src/providers/database/provider.rs:3613-3623 — 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) nomt/core/src/proof/multi_proof.rs:357— nomt/core/src/proof/multi_proof.rs:357-367 | nomt/core/src/proof/multi_proof.rs:385-396 — 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) reth/crates/transaction-pool/src/blobstore/mem.rs:91— reth/crates/transaction-pool/src/blobstore/mem.rs:91-101 | reth/crates/transaction-pool/src/blobstore/mem.rs:103-115 — 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) reth/crates/evm/src/system_calls/mod.rs:272— reth/crates/evm/src/system_calls/mod.rs:272-282 | reth/crates/evm/src/system_calls/mod.rs:310-320 — 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1176— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1176-1186 | reth/crates/storage/provider/src/providers/blockchain_provider.rs:1212-1222 — 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) bench/src/speed/hover_gen.rs:66— bench/src/speed/hover_gen.rs:66-76 | bench/src/speed/test_gen.rs:305-318 — 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.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×7
Edited copy of a member (16 corresponding lines) reth/crates/net/eth-wire-types/src/broadcast.rs:381— reth/crates/net/eth-wire-types/src/broadcast.rs:381-396 | reth/crates/net/eth-wire-types/src/broadcast.rs:397-412 — 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) reth/crates/ethereum/evm/src/execute.rs:294— reth/crates/ethereum/evm/src/execute.rs:294-309 | reth/crates/optimism/evm/src/execute.rs:310-326 — 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) reth/crates/stages/stages/src/stages/sender_recovery.rs:296— reth/crates/stages/stages/src/stages/sender_recovery.rs:296-311 | reth/crates/stages/stages/src/stages/tx_lookup.rs:226-244 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:1738— reth/crates/storage/provider/src/providers/database/provider.rs:1738-1753 | reth/crates/storage/provider/src/providers/database/provider.rs:1759-1777 — 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) reth/crates/stages/stages/src/stages/hashing_account.rs:232— reth/crates/stages/stages/src/stages/hashing_account.rs:232-248 | reth/crates/stages/stages/src/stages/hashing_storage.rs:168-183 — 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) reth/crates/optimism/node/src/engine.rs:120— reth/crates/optimism/node/src/engine.rs:120-135 | reth/crates/payload/primitives/src/lib.rs:308-323 — 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) reth/crates/ethereum/consensus/src/lib.rs:138— reth/crates/ethereum/consensus/src/lib.rs:138-155 | reth/crates/optimism/consensus/src/lib.rs:60-75 — 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.
Duplicated block (18 lines × 2) reth/crates/cli/commands/src/stage/dump/hashing_account.rs:88— reth/crates/cli/commands/src/stage/dump/hashing_account.rs:88-105 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:83-100 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/hashing_account.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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 `reth/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) reth/crates/optimism/rpc/src/eth/mod.rs:77— reth/crates/optimism/rpc/src/eth/mod.rs:77-94 | reth/crates/rpc/rpc/src/eth/core.rs:104-121 — 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 (18 lines × 2) reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:148— reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:148-165 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:431-448 — 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 (18 lines × 2) reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:224— reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:224-241 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:402-419 — 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 `reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:224` 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) reth/crates/storage/provider/src/providers/state/historical.rs:270— reth/crates/storage/provider/src/providers/state/historical.rs:270-287 | reth/crates/storage/provider/src/providers/state/latest.rs:67-84 — 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 (18 lines × 2) reth/crates/transaction-pool/src/blobstore/disk.rs:138— reth/crates/transaction-pool/src/blobstore/disk.rs:138-155 | reth/crates/transaction-pool/src/blobstore/mem.rs:123-140 — 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 `reth/crates/transaction-pool/src/blobstore/disk.rs:138` 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) reth/crates/node/builder/src/launch/engine.rs:393— reth/crates/node/builder/src/launch/engine.rs:393-410 | reth/crates/node/builder/src/launch/mod.rs:426-443 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 `reth/crates/node/builder/src/launch/engine.rs:393` 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) nomt/benchtop/src/timer.rs:135— nomt/benchtop/src/timer.rs:135-146 | nomt/nomt/src/metrics.rs:153-164 — 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 (12 lines × 2) nomt/core/src/proof/multi_proof.rs:877— nomt/core/src/proof/multi_proof.rs:877-888 | nomt/core/src/proof/path_proof.rs:343-354 — 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 `nomt/core/src/proof/multi_proof.rs:877` 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) reth/crates/ethereum/payload/src/lib.rs:290— reth/crates/ethereum/payload/src/lib.rs:290-301 | reth/crates/optimism/payload/src/builder.rs:408-419 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/ethereum/payload/src/lib.rs:290` 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) reth/crates/net/eth-wire-types/src/broadcast.rs:382— reth/crates/net/eth-wire-types/src/broadcast.rs:382-393 | reth/crates/net/eth-wire-types/src/broadcast.rs:398-409 — 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) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:594— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:594-605 | reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:181-192 — 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 `reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:594` 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) reth/crates/storage/provider/src/providers/database/provider.rs:1059— reth/crates/storage/provider/src/providers/database/provider.rs:1059-1070 | reth/crates/storage/provider/src/providers/database/provider.rs:1116-1127 — 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) bench/src/speed/hover_gen.rs:218— bench/src/speed/hover_gen.rs:218-229 | bench/src/speed/hover_gen.rs:264-275 — 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.
HackComment reth/crates/rpc/rpc-eth-types/src/cache/db.rs:18— /// Hack to get around 'higher-ranked lifetime error', see — 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.
HackComment reth/crates/rpc/rpc-eth-types/src/cache/db.rs:171— /// Hack to get around 'higher-ranked lifetime error', see — 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.
HackComment reth/crates/primitives/src/block.rs:19— // HACK(onbjerg): we need this to always set `requests` to `None` since we might otherwise generate — 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.
HackComment reth/crates/primitives/src/block.rs:223— // for now just generate empty requests, see HACK above — 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.
HackComment reth/crates/primitives/src/block.rs:697— // for now just generate empty requests, see HACK above — 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.
HackComment nomt/nomt/src/beatree/iterator.rs:558— // hack: an owned cursor would be very, very useful instead of doing this. — 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.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×6
Edited copy of a member (7 corresponding lines) reth/crates/storage/db-api/src/mock.rs:139— reth/crates/storage/db-api/src/mock.rs:139-146 | reth/crates/storage/db-api/src/mock.rs:173-179 — 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) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:880— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:880-886 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:892-898 — 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) reth/crates/storage/provider/src/providers/static_file/jar.rs:188— reth/crates/storage/provider/src/providers/static_file/jar.rs:188-194 | reth/crates/storage/provider/src/providers/static_file/jar.rs:198-204 — 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) reth/crates/ethereum/node/src/node.rs:318— reth/crates/ethereum/node/src/node.rs:318-324 | reth/crates/optimism/node/src/node.rs:411-417 — 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) reth/crates/evm/execution-errors/src/lib.rs:238— reth/crates/evm/execution-errors/src/lib.rs:238-244 | reth/crates/evm/execution-errors/src/trie.rs:113-119 — 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/qmdb-common/src/utils/short_key.rs:100— crates/qmdb-common/src/utils/short_key.rs:100-106 | crates/qmdb/src/prefetcher/dioprefetcher.rs:498-505 — 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.
Duplicated block (16 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:446— nomt/nomt/src/beatree/ops/update/branch_stage.rs:446-461 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:676-691 — before extracting anything, compare `nomt/nomt/src/beatree/ops/update/branch_stage.rs` and `nomt/nomt/src/beatree/ops/update/leaf_stage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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 `nomt/nomt/src/beatree/ops/update/branch_stage.rs:446` 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 × 2) nomt/nomt/src/lib.rs:771— nomt/nomt/src/lib.rs:771-786 | nomt/nomt/src/lib.rs:826-841 — 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) reth/crates/node/builder/src/launch/engine.rs:91— reth/crates/node/builder/src/launch/engine.rs:91-106 | reth/crates/node/builder/src/launch/mod.rs:126-141 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 after the matched lines, `reth/crates/node/builder/src/launch/mod.rs:143` calls `with_canon_state_notifications`, `clone` and `reth/crates/node/builder/src/launch/engine.rs:109` 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 (16 lines × 2) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435— reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435-450 | reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:465-480 — 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 `reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435` 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:267— reth/crates/storage/provider/src/providers/blockchain_provider.rs:267-282 | reth/crates/storage/provider/src/providers/database/provider.rs:964-979 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 `reth/crates/storage/provider/src/providers/blockchain_provider.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 (16 lines × 2) reth/crates/storage/provider/src/providers/blockchain_provider.rs:425— reth/crates/storage/provider/src/providers/blockchain_provider.rs:425-440 | reth/crates/storage/provider/src/providers/blockchain_provider.rs:523-538 — 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 (14 lines × 2) reth/crates/consensus/beacon/src/engine/sync.rs:262— reth/crates/consensus/beacon/src/engine/sync.rs:262-275 | reth/crates/engine/tree/src/backfill.rs:135-148 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/sync.rs` and `reth/crates/engine/tree/src/backfill.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `reth/crates/consensus/beacon/src/engine/sync.rs:262` 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 (14 lines × 2) reth/crates/ethereum/consensus/src/validation.rs:87— reth/crates/ethereum/consensus/src/validation.rs:87-100 | reth/crates/optimism/consensus/src/validation.rs:80-93 — 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 (14 lines × 2) reth/crates/ethereum/evm/src/lib.rs:109— reth/crates/ethereum/evm/src/lib.rs:109-122 | reth/crates/optimism/evm/src/lib.rs:113-126 — 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 `reth/crates/ethereum/evm/src/lib.rs:109` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/optimism/evm/src/lib.rs:127` calls `is_optimism` and `reth/crates/ethereum/evm/src/lib.rs:123` 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) reth/crates/ethereum/node/src/node.rs:247— reth/crates/ethereum/node/src/node.rs:247-260 | reth/crates/optimism/node/src/node.rs:293-306 — 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 `reth/crates/ethereum/node/src/node.rs:247` 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) reth/crates/net/network/src/error.rs:210— reth/crates/net/network/src/error.rs:210-223 | reth/crates/net/network/src/error.rs:228-241 — 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 `reth/crates/net/network/src/error.rs:210` 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) reth/crates/optimism/node/src/engine.rs:97— reth/crates/optimism/node/src/engine.rs:97-110 | reth/crates/payload/primitives/src/lib.rs:144-157 — 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 `reth/crates/optimism/node/src/engine.rs:97` 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.
Unfinished stub — panics or fails with a "not implemented" message reth/crates/rpc/rpc/src/admin.rs:182— `subscribe_peer_events`'s whole body panics or returns an error whose message says it isn't finished — generated scaffolding that was never completed. Implement it or remove it.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:89— `from_compact` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:226— `from_compact` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:244— `specialized_from_compact` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/provider/src/providers/bundle_state_provider.rs:63— `canonical_hashes_range` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/provider/src/providers/bundle_state_provider.rs:94— `state_root_from_nodes` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — panics or fails with a "not implemented" message reth/crates/rpc/rpc/src/admin.rs:182— `subscribe_peer_events`'s whole body panics or returns an error whose message says it isn't finished — a not-implemented stub in ordinary clothes. Implement it or remove it.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:89— `from_compact` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:226— `from_compact` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/codecs/src/lib.rs:244— `specialized_from_compact` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/provider/src/providers/bundle_state_provider.rs:63— `canonical_hashes_range` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface.
Unfinished stub — body is todo!() / unimplemented!() reth/crates/storage/provider/src/providers/bundle_state_provider.rs:94— `state_root_from_nodes` is a shipped function whose whole body is `todo!()`/`unimplemented!()` — scaffolding that was never completed, and a panic on the first call. Implement it or remove the dead surface.
EngineApiTreeHandler::on_engine_message (cognitive 22) reth/crates/engine/tree/src/tree/mod.rs:1187— EngineApiTreeHandler::on_engine_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 4 (8 pts) (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.
EngineApiTreeHandler::on_forkchoice_updated (cognitive 20) reth/crates/engine/tree/src/tree/mod.rs:970— EngineApiTreeHandler::on_forkchoice_updated has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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.
EngineApiTreeHandler::on_new_payload (cognitive 17) reth/crates/engine/tree/src/tree/mod.rs:720— EngineApiTreeHandler::on_new_payload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 4). 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.
EngineApiTreeHandler::on_new_head (cognitive 17) reth/crates/engine/tree/src/tree/mod.rs:840— EngineApiTreeHandler::on_new_head has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), 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.
EngineApiTreeHandler::advance_persistence (cognitive 17) reth/crates/engine/tree/src/tree/mod.rs:1131— EngineApiTreeHandler::advance_persistence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×5
Edited copy of a member (22 corresponding lines) reth/crates/trie/trie/src/state.rs:30— reth/crates/trie/trie/src/state.rs:30-51 | reth/crates/trie/trie/src/state.rs:57-78 — 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) reth/crates/optimism/rpc/src/eth/mod.rs:76— reth/crates/optimism/rpc/src/eth/mod.rs:76-97 | reth/crates/rpc/rpc/src/eth/core.rs:103-124 — 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) reth/crates/static-file/static-file/src/segments/receipts.rs:27— reth/crates/static-file/static-file/src/segments/receipts.rs:27-48 | reth/crates/static-file/static-file/src/segments/transactions.rs:29-54 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:748— reth/crates/consensus/beacon/src/engine/mod.rs:748-771 | reth/crates/engine/tree/src/tree/mod.rs:1632-1653 — 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) nomt/benchtop/src/custom_workload.rs:60— nomt/benchtop/src/custom_workload.rs:60-82 | nomt/benchtop/src/transfer_workload.rs:73-94 — 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 (13 corresponding lines) · ×5
Edited copy of a member (13 corresponding lines) reth/crates/storage/libmdbx-rs/src/transaction.rs:409— reth/crates/storage/libmdbx-rs/src/transaction.rs:409-421 | reth/crates/storage/libmdbx-rs/src/transaction.rs:432-450 — 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) reth/crates/transaction-pool/src/blobstore/mem.rs:36— reth/crates/transaction-pool/src/blobstore/mem.rs:36-49 | reth/crates/transaction-pool/src/blobstore/mem.rs:59-71 — 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) reth/crates/net/downloaders/src/bodies/task.rs:73— reth/crates/net/downloaders/src/bodies/task.rs:73-86 | reth/crates/net/downloaders/src/headers/task.rs:69-81 — 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) reth/crates/storage/provider/src/providers/state/historical.rs:84— reth/crates/storage/provider/src/providers/state/historical.rs:84-96 | reth/crates/storage/provider/src/providers/state/historical.rs:103-115 — 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) reth/crates/transaction-pool/src/test_utils/mock.rs:397— reth/crates/transaction-pool/src/test_utils/mock.rs:397-409 | reth/crates/transaction-pool/src/test_utils/mock.rs:412-424 — 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.
Duplicated block (13–14 lines × 2) bench/src/speed/nomt_adapter.rs:90— bench/src/speed/nomt_adapter.rs:90-102 | nomt/benchtop/src/nomt.rs:250-263 — 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 `nomt/benchtop/src/nomt.rs:250` 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) reth/crates/cli/commands/src/stage/dump/execution.rs:144— reth/crates/cli/commands/src/stage/dump/execution.rs:144-156 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:54-67 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/execution.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 (13–14 lines × 2) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:613— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:613-625 | reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:219-232 — 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) reth/crates/stages/stages/src/stages/bodies.rs:361— reth/crates/stages/stages/src/stages/bodies.rs:361-373 | reth/crates/stages/stages/src/stages/execution.rs:636-649 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `provider` to `&Provider` in one and `&StaticFileProvider` 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–14 lines × 2) reth/crates/stages/stages/src/stages/hashing_account.rs:159— reth/crates/stages/stages/src/stages/hashing_account.rs:159-172 | reth/crates/stages/stages/src/stages/hashing_storage.rs:92-104 — before extracting anything, compare `reth/crates/stages/stages/src/stages/hashing_account.rs` and `reth/crates/stages/stages/src/stages/hashing_storage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `reth/crates/stages/stages/src/stages/hashing_account.rs:159` 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) reth/crates/chain-state/src/in_memory.rs:270— reth/crates/chain-state/src/in_memory.rs:270-282 | reth/crates/chain-state/src/in_memory.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. Read the line range as the matched WINDOW rather than a finished unit: at `reth/crates/chain-state/src/in_memory.rs:270` 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) reth/crates/ethereum/payload/src/lib.rs:423— reth/crates/ethereum/payload/src/lib.rs:423-435 | reth/crates/optimism/payload/src/builder.rs:516-528 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/ethereum/payload/src/lib.rs:423` 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 × 2) reth/crates/storage/provider/src/writer/mod.rs:400— reth/crates/storage/provider/src/writer/mod.rs:400-412 | reth/crates/storage/provider/src/writer/mod.rs:470-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 `reth/crates/storage/provider/src/writer/mod.rs:400` 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) reth/crates/trie/trie/src/state.rs:39— reth/crates/trie/trie/src/state.rs:39-51 | reth/crates/trie/trie/src/state.rs:66-78 — 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 `reth/crates/trie/trie/src/state.rs:39` 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 × 2) nomt/torture/src/supervisor/workload.rs:387— nomt/torture/src/supervisor/workload.rs:387-399 | nomt/torture/src/supervisor/workload.rs:561-574 — 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.
Low cohesion: PeersConfig (LCOM4 9) reth/crates/net/network-types/src/peers/config.rs:122— PeersConfig'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: MockEthProvider (LCOM4 6) reth/crates/storage/provider/src/test_utils/mock.rs:46— MockEthProvider's methods fall into 6 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 6 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) reth/crates/exex/exex/src/backfill/stream.rs:49— 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: StaticFileProvider (LCOM4 5) reth/crates/storage/provider/src/providers/static_file/manager.rs:78— StaticFileProvider'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: Zstd (LCOM4 4) reth/crates/storage/nippy-jar/src/compression/zstd.rs:25— 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.
nomt::beatree::ops::bit_ops::bitwise_memcpy (cyclomatic 21) nomt/nomt/src/beatree/ops/bit_ops.rs:124— nomt::beatree::ops::bit_ops::bitwise_memcpy 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.
nomt::io::linux::run_worker (cyclomatic 21) nomt/nomt/src/io/linux.rs:71— nomt::io::linux::run_worker 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.
nomt::merkle::worker::warm_up_phase (cyclomatic 18) nomt/nomt/src/merkle/worker.rs:119— nomt::merkle::worker::warm_up_phase 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.
nomt::beatree::ops::update::extend_range_protocol::try_answer_left_neighbor (cyclomatic 17) nomt/nomt/src/beatree/ops/update/extend_range_protocol.rs:49— nomt::beatree::ops::update::extend_range_protocol::try_answer_left_neighbor 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.
StaticFileProvider::check_consistency (cognitive 36) reth/crates/storage/provider/src/providers/static_file/manager.rs:630— StaticFileProvider::check_consistency has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 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.
StaticFileProvider::watch_directory (cognitive 30) reth/crates/storage/provider/src/providers/static_file/manager.rs:112— StaticFileProvider::watch_directory has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 2 (4 pts), match/switch 1 (2 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.
StaticFileProvider::fetch_range_with_predicate (cognitive 21) reth/crates/storage/provider/src/providers/static_file/manager.rs:946— StaticFileProvider::fetch_range_with_predicate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (4 pts), loops 2 (3 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.
StaticFileProvider::ensure_invariants (cognitive 19) reth/crates/storage/provider/src/providers/static_file/manager.rs:802— StaticFileProvider::ensure_invariants has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, match/switch 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.
Workload::run_iteration (cognitive 22) nomt/torture/src/supervisor/workload.rs:291— Workload::run_iteration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 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.
Workload::gen_key_value_change (cognitive 22) nomt/torture/src/supervisor/workload.rs:947— Workload::gen_key_value_change has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (7 pts), boolean chains 3, loops 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.
Workload::exercise_commit (cognitive 20) nomt/torture/src/supervisor/workload.rs:363— Workload::exercise_commit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 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.
Workload::exercise_rollback (cognitive 19) nomt/torture/src/supervisor/workload.rs:532— Workload::exercise_rollback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 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.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×4
Edited copy of a member (31 corresponding lines) reth/crates/storage/libmdbx-rs/src/cursor.rs:562— reth/crates/storage/libmdbx-rs/src/cursor.rs:562-597 | reth/crates/storage/libmdbx-rs/src/cursor.rs:657-692 — 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) reth/crates/prune/prune/src/db_ext.rs:21— reth/crates/prune/prune/src/db_ext.rs:21-51 | reth/crates/prune/prune/src/db_ext.rs:62-97 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:592— reth/crates/consensus/beacon/src/engine/mod.rs:592-622 | reth/crates/node/builder/src/launch/common.rs:820-853 — 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) bench/src/speed/hover_gen.rs:206— bench/src/speed/hover_gen.rs:206-236 | bench/src/speed/hover_gen.rs:247-280 — 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) reth/crates/cli/commands/src/stage/dump/execution.rs:30— reth/crates/cli/commands/src/stage/dump/execution.rs:30-51 | reth/crates/cli/commands/src/stage/dump/hashing_account.rs:24-51 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:23-41 | reth/crates/cli/commands/src/stage/dump/merkle.rs:34-68 — 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) reth/crates/optimism/hardforks/src/hardfork.rs:63— reth/crates/optimism/hardforks/src/hardfork.rs:63-94 | reth/crates/optimism/hardforks/src/hardfork.rs:97-127 | reth/crates/optimism/hardforks/src/hardfork.rs:130-161 | reth/crates/optimism/hardforks/src/hardfork.rs:164-195 — 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) reth/crates/prune/prune/src/segments/receipts.rs:25— reth/crates/prune/prune/src/segments/receipts.rs:25-63 | reth/crates/prune/prune/src/segments/static_file/transactions.rs:43-80 | reth/crates/prune/prune/src/segments/user/sender_recovery.rs:41-80 | reth/crates/prune/prune/src/segments/user/transaction_lookup.rs:42-108 — 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) reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:147— reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:147-165 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:168-190 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:193-218 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:430-448 — 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 (20 corresponding lines) · ×4
Edited copy of a member (20 corresponding lines) reth/crates/config/src/config.rs:38— reth/crates/config/src/config.rs:38-57 | reth/crates/node/core/src/node_config.rs:405-424 — 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) reth/crates/net/network/src/session/active.rs:306— reth/crates/net/network/src/session/active.rs:306-325 | reth/crates/net/network/src/session/active.rs:332-355 — 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) reth/crates/storage/provider/src/providers/database/provider.rs:2000— reth/crates/storage/provider/src/providers/database/provider.rs:2000-2019 | reth/crates/storage/provider/src/providers/database/provider.rs:2024-2043 — 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) reth/crates/transaction-pool/src/pool/mod.rs:890— reth/crates/transaction-pool/src/pool/mod.rs:890-909 | reth/crates/transaction-pool/src/pool/mod.rs:931-950 — 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.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) reth/crates/ethereum/node/src/node.rs:236— reth/crates/ethereum/node/src/node.rs:236-260 | reth/crates/optimism/node/src/node.rs:280-306 — 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) reth/crates/consensus/beacon/src/engine/hooks/prune.rs:59— reth/crates/consensus/beacon/src/engine/hooks/prune.rs:59-83 | reth/crates/consensus/beacon/src/engine/hooks/static_file.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.
Edited copy of a member (25 corresponding lines) reth/crates/consensus/common/src/validation.rs:107— reth/crates/consensus/common/src/validation.rs:107-135 | reth/crates/optimism/consensus/src/lib.rs:123-147 — 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) reth/crates/optimism/consensus/src/proof.rs:14— reth/crates/optimism/consensus/src/proof.rs:14-38 | reth/crates/optimism/consensus/src/proof.rs:47-73 — 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 (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) reth/crates/net/ecies/src/algorithm.rs:457— reth/crates/net/ecies/src/algorithm.rs:457-474 | reth/crates/net/ecies/src/algorithm.rs:533-554 — 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) nomt/benchtop/src/backend.rs:92— nomt/benchtop/src/backend.rs:92-109 | nomt/benchtop/src/backend.rs:120-143 — 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) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:329— reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:329-350 | reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:370-387 — 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) reth/crates/tasks/src/lib.rs:455— reth/crates/tasks/src/lib.rs:455-472 | reth/crates/tasks/src/lib.rs:501-521 — 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 (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) reth/crates/consensus/beacon/src/engine/sync.rs:236— reth/crates/consensus/beacon/src/engine/sync.rs:236-257 | reth/crates/engine/tree/src/backfill.rs:159-177 — 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) reth/crates/evm/src/system_calls/mod.rs:171— reth/crates/evm/src/system_calls/mod.rs:171-189 | reth/crates/evm/src/system_calls/mod.rs:226-244 — 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) bench/src/speed/test_helper.rs:12— bench/src/speed/test_helper.rs:12-35 | bench/src/speed/test_helper.rs:38-56 — 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) nomt/fuzz/fuzz_targets/bitwise_memcpy.rs:49— nomt/fuzz/fuzz_targets/bitwise_memcpy.rs:49-68 | nomt/fuzz/fuzz_targets/reconstruct_key.rs:51-69 — 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 (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:501— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:501-506 | reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:60-65 — 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) reth/crates/stages/api/src/pipeline/mod.rs:580— reth/crates/stages/api/src/pipeline/mod.rs:580-586 | reth/crates/stages/api/src/pipeline/builder.rs:94-99 — 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) reth/crates/stages/stages/src/test_utils/test_db.rs:97— reth/crates/stages/stages/src/test_utils/test_db.rs:97-104 | reth/crates/storage/provider/src/providers/database/provider.rs:357-362 — 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) reth/crates/consensus/beacon/src/engine/mod.rs:816— reth/crates/consensus/beacon/src/engine/mod.rs:816-822 | reth/crates/engine/tree/src/tree/mod.rs:1708-1713 — 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 (20 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:212— nomt/nomt/src/beatree/ops/update/branch_stage.rs:212-231 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:364-383 — before extracting anything, compare `nomt/nomt/src/beatree/ops/update/branch_stage.rs` and `nomt/nomt/src/beatree/ops/update/leaf_stage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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 `nomt/nomt/src/beatree/ops/update/branch_stage.rs:212` 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 (20 lines × 2) reth/crates/net/peers/src/node_record.rs:177— reth/crates/net/peers/src/node_record.rs:177-196 | reth/crates/net/peers/src/trusted_peer.rs:144-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 `reth/crates/net/peers/src/node_record.rs:177` 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 (20 lines × 2) reth/crates/stages/stages/src/stages/index_account_history.rs:81— reth/crates/stages/stages/src/stages/index_account_history.rs:81-100 | reth/crates/stages/stages/src/stages/index_storage_history.rs:83-102 — 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 `reth/crates/stages/stages/src/stages/index_account_history.rs:81` 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) nomt/benchtop/src/workload.rs:75— nomt/benchtop/src/workload.rs:75-94 | nomt/benchtop/src/workload.rs:109-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. Read the line range as the matched WINDOW rather than a finished unit: at `nomt/benchtop/src/workload.rs:75` 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 (17 lines × 2) reth/crates/evm/src/system_calls/mod.rs:173— reth/crates/evm/src/system_calls/mod.rs:173-189 | reth/crates/evm/src/system_calls/mod.rs:228-244 — 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 `reth/crates/evm/src/system_calls/mod.rs:173` 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 (17 lines × 2) reth/crates/storage/nippy-jar/src/compression/lz4.rs:19— reth/crates/storage/nippy-jar/src/compression/lz4.rs:19-35 | reth/crates/storage/nippy-jar/src/compression/zstd.rs:132-148 — 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 `reth/crates/storage/nippy-jar/src/compression/lz4.rs:19` 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 (17 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:654— reth/crates/storage/provider/src/providers/database/provider.rs:654-670 | reth/crates/storage/provider/src/providers/database/provider.rs:1088-1104 — 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) bench/src/speed/hover_gen.rs:102— bench/src/speed/hover_gen.rs:102-118 | bench/src/speed/hover_gen.rs:160-176 — 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 `bench/src/speed/hover_gen.rs:102` 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) reth/crates/evm/src/system_calls/eip7002.rs:49— reth/crates/evm/src/system_calls/eip7002.rs:49-63 | reth/crates/evm/src/system_calls/eip7251.rs:51-65 — 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 `reth/crates/evm/src/system_calls/eip7002.rs:49` 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) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:330— reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:330-344 | reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:372-386 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `res` to `ProviderResult<Option<Arc<BlockWithSenders>>>` in one and `ProviderResult<Option<BlockWithSenders>>` 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) reth/crates/storage/provider/src/providers/blockchain_provider.rs:239— reth/crates/storage/provider/src/providers/blockchain_provider.rs:239-253 | reth/crates/storage/provider/src/providers/database/provider.rs:934-948 — before extracting anything, compare `reth/crates/storage/provider/src/providers/blockchain_provider.rs` and `reth/crates/storage/provider/src/providers/database/provider.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 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 `reth/crates/storage/provider/src/providers/blockchain_provider.rs:239` 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 lines × 2) reth/crates/consensus/beacon/src/engine/mod.rs:1119— reth/crates/consensus/beacon/src/engine/mod.rs:1119-1133 | reth/crates/engine/tree/src/tree/mod.rs:755-769 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/mod.rs` and `reth/crates/engine/tree/src/tree/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 `reth/crates/consensus/beacon/src/engine/mod.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.
Duplicated block (8 lines × 3) reth/crates/prune/prune/src/segments/static_file/headers.rs:156— reth/crates/prune/prune/src/segments/static_file/headers.rs:156-163 | reth/crates/prune/prune/src/segments/static_file/headers.rs:165-172 | reth/crates/prune/prune/src/segments/static_file/headers.rs:173-181 — 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 `reth/crates/prune/prune/src/segments/static_file/headers.rs:156` 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) reth/crates/rpc/rpc-testing-util/src/debug.rs:297— reth/crates/rpc/rpc-testing-util/src/debug.rs:297-304 | reth/crates/rpc/rpc-testing-util/src/debug.rs:329-336 | reth/crates/rpc/rpc-testing-util/src/trace.rs:386-393 — 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.
Duplicated block (8 lines × 3) reth/crates/storage/provider/src/providers/database/provider.rs:1595— reth/crates/storage/provider/src/providers/database/provider.rs:1595-1602 | reth/crates/storage/provider/src/providers/state/historical.rs:256-263 | reth/crates/storage/provider/src/providers/state/latest.rs:53-60 — 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.
Duplicated block (8 lines × 3) reth/crates/storage/provider/src/test_utils/blocks.rs:336— reth/crates/storage/provider/src/test_utils/blocks.rs:336-343 | reth/crates/storage/provider/src/test_utils/blocks.rs:429-436 | reth/crates/storage/provider/src/test_utils/blocks.rs:517-524 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:336` 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.
Command::execute (cyclomatic 21) reth/bin/reth/src/commands/debug_cmd/merkle.rs:81— Command::execute has cyclomatic complexity 21 (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.
Command::execute (cyclomatic 21) reth/crates/cli/commands/src/stage/run.rs:107— 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.
Command::execute (cyclomatic 17) reth/crates/cli/commands/src/stage/drop.rs:31— Command::execute has cyclomatic complexity 17 (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.
AllTransactions::update (cognitive 58) reth/crates/transaction-pool/src/pool/txpool.rs:1081— AllTransactions::update has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (46 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 31) reth/crates/transaction-pool/src/pool/txpool.rs:1529— AllTransactions::insert_tx has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (29 pts), loops 1, 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.
AllTransactions::ensure_valid_blob_transaction (cognitive 23) reth/crates/transaction-pool/src/pool/txpool.rs:1397— AllTransactions::ensure_valid_blob_transaction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 13). 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.
Discv4Service::poll (cognitive 44) reth/crates/net/discv4/src/lib.rs:1584— Discv4Service::poll has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 7 (14 pts), match/switch 3 (10 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.
Discv4Service::on_neighbours (cognitive 23) reth/crates/net/discv4/src/lib.rs:1302— Discv4Service::on_neighbours has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (6 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.
Discv4Service::on_ping (cognitive 19) reth/crates/net/discv4/src/lib.rs:1002— Discv4Service::on_ping has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (5 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.
Command::execute (cognitive 34) reth/bin/reth/src/commands/debug_cmd/merkle.rs:81— Command::execute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 6 (11 pts), match/switch 2 (6 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.
Command::static_files_stats_table (cognitive 25) reth/crates/cli/commands/src/db/stats.rs:146— 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 (cognitive 19) reth/crates/cli/commands/src/stage/run.rs:107— Command::execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), 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.
reth_rpc_eth_types::simulate::resolve_transactions (cognitive 30) reth/crates/rpc/rpc-eth-types/src/simulate.rs:61— reth_rpc_eth_types::simulate::resolve_transactions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 3 (7 pts), boolean chains 1, 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_rpc_eth_types::logs_utils::append_matching_block_logs (cognitive 21) reth/crates/rpc/rpc-eth-types/src/logs_utils.rs:59— reth_rpc_eth_types::logs_utils::append_matching_block_logs has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 2 (11 pts), if/else 2 (7 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::fee_history::fee_history_cache_new_blocks_task (cognitive 18) reth/crates/rpc/rpc-eth-types/src/fee_history.rs:208— reth_rpc_eth_types::fee_history::fee_history_cache_new_blocks_task has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 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.
PeersManager::on_connection_failure (cognitive 29) reth/crates/net/network/src/peers.rs:539— PeersManager::on_connection_failure has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 1 (nesting depth added 15). 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 28) reth/crates/net/network/src/peers.rs:882— PeersManager::poll has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (8 pts), 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.
PeersManager::apply_reputation_change (cognitive 18) reth/crates/net/network/src/peers.rs:405— PeersManager::apply_reputation_change has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 9). 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.
TransactionsManager::import_transactions (cognitive 28) reth/crates/net/network/src/transactions/mod.rs:954— TransactionsManager::import_transactions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (6 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.
TransactionsManager::propagate_transactions (cognitive 22) reth/crates/net/network/src/transactions/mod.rs:417— TransactionsManager::propagate_transactions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (9 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.
TransactionsManager::on_new_pooled_transaction_hashes (cognitive 19) reth/crates/net/network/src/transactions/mod.rs:611— TransactionsManager::on_new_pooled_transaction_hashes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17 (18 pts), 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.
PageWalker::replace_terminal (cognitive 23) nomt/nomt/src/merkle/page_walker.rs:327— PageWalker::replace_terminal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3 (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.
PageWalker::handle_elision_threshold (cognitive 22) nomt/nomt/src/merkle/page_walker.rs:812— PageWalker::handle_elision_threshold has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 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.
PageWalker::compact_up (cognitive 20) nomt/nomt/src/merkle/page_walker.rs:593— PageWalker::compact_up has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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.
FunctionTooLong: torture::agent::run nomt/torture/src/agent.rs:34— FunctionTooLong — torture::agent::run runs 106 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 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.
FunctionTooLong: qmdb_common::merkletree::multiproof::verify_partial_merkle_tree crates/qmdb-common/src/merkletree/multiproof.rs:159— FunctionTooLong — qmdb_common::merkletree::multiproof::verify_partial_merkle_tree runs 104 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 4 over it, 1.04× 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_rpc_eth_types::simulate::build_block reth/crates/rpc/rpc-eth-types/src/simulate.rs:175— FunctionTooLong — reth_rpc_eth_types::simulate::build_block runs 103 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 3 over it, 1.03× 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.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×3
Edited copies of one member (4 members, 10+ corresponding lines) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:644— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:644-653 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:657-666 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:675-685 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:694-704 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 10+ corresponding lines) reth/crates/ethereum/evm/src/execute.rs:364— reth/crates/ethereum/evm/src/execute.rs:364-373 | reth/crates/optimism/evm/src/execute.rs:369-382 | reth/crates/optimism/evm/src/execute.rs:391-405 | reth/crates/optimism/evm/src/execute.rs:414-431 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 10+ corresponding lines) reth/crates/trie/db/src/state.rs:171— reth/crates/trie/db/src/state.rs:171-180 | reth/crates/trie/db/src/state.rs:185-194 | reth/crates/trie/db/src/state.rs:196-205 | reth/crates/trie/db/src/state.rs:210-219 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1249— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1249-1253 | reth/crates/storage/provider/src/providers/database/provider.rs:2175-2179 — 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) reth/crates/net/peers/src/node_record.rs:49— reth/crates/net/peers/src/node_record.rs:49-53 | reth/crates/net/peers/src/trusted_peer.rs:37-41 — 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) nomt/nomt/src/beatree/index.rs:22— nomt/nomt/src/beatree/index.rs:22-26 | nomt/nomt/src/merkle/page_set.rs:107-112 — 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.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) reth/crates/node/core/src/args/debug.rs:224— reth/crates/node/core/src/args/debug.rs:224-226 | reth/crates/rpc/rpc-server-types/src/module.rs:211-217 — 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) nomt/core/src/proof/path_proof.rs:379— nomt/core/src/proof/path_proof.rs:379-381 | nomt/core/src/update.rs:12-14 — 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) reth/crates/optimism/node/src/txpool.rs:188— reth/crates/optimism/node/src/txpool.rs:188-190 | reth/crates/transaction-pool/src/validate/eth.rs:75-77 — 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 (21 lines × 2) reth/crates/cli/commands/src/stage/run.rs:156— reth/crates/cli/commands/src/stage/run.rs:156-176 | reth/crates/cli/commands/src/stage/run.rs:206-226 — 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, `reth/crates/cli/commands/src/stage/run.rs:204` calls `extend`, `clone` and `reth/crates/cli/commands/src/stage/run.rs:154` 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 (21 lines × 2) reth/crates/ethereum/payload/src/lib.rs:260— reth/crates/ethereum/payload/src/lib.rs:260-280 | reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:351-371 — 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 `reth/crates/ethereum/payload/src/lib.rs:260` 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 (21 lines × 2) reth/crates/prune/prune/src/segments/user/account_history.rs:63— reth/crates/prune/prune/src/segments/user/account_history.rs:63-83 | reth/crates/prune/prune/src/segments/user/storage_history.rs:63-83 — before extracting anything, compare `reth/crates/prune/prune/src/segments/user/account_history.rs` and `reth/crates/prune/prune/src/segments/user/storage_history.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `reth/crates/prune/prune/src/segments/user/account_history.rs:63` 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 × 3) reth/crates/net/ecies/src/algorithm.rs:596— reth/crates/net/ecies/src/algorithm.rs:596-601 | reth/crates/net/ecies/src/algorithm.rs:603-608 | reth/crates/net/ecies/src/algorithm.rs:612-617 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/net/ecies/src/algorithm.rs:609` calls `Some`, `into` and `reth/crates/net/ecies/src/algorithm.rs:603` 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 (6 lines × 3) reth/crates/blockchain-tree-api/src/lib.rs:46— reth/crates/blockchain-tree-api/src/lib.rs:46-51 | reth/crates/engine/tree/src/tree/mod.rs:1787-1792 | reth/crates/engine/tree/src/tree/mod.rs:2111-2116 — 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 `reth/crates/engine/tree/src/tree/mod.rs:1787` 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 × 3) reth/crates/primitives/src/transaction/mod.rs:1184— reth/crates/primitives/src/transaction/mod.rs:1184-1189 | reth/crates/primitives/src/transaction/mod.rs:1196-1201 | reth/crates/primitives/src/transaction/pooled.rs:178-183 — 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.
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 reth/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 reth/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 nomt/nomt/src/rollback/delta.rs:101— `value_len` is read from the bytes being parsed at line 100 (`u32::from_le_bytes`), then used to size a `.resize` at line 101 — and nowhere in its scope is `value_len` 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_len` against the bytes actually remaining and a maximum the format allows before allocating.
ActiveSession::on_incoming_message (cyclomatic 36) reth/crates/net/network/src/session/active.rs:124— ActiveSession::on_incoming_message has cyclomatic complexity 36 (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 30) reth/crates/net/network/src/session/active.rs:475— ActiveSession::poll 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.
Discv4Service::poll (cyclomatic 32) reth/crates/net/discv4/src/lib.rs:1584— Discv4Service::poll has cyclomatic complexity 32 (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.
Discv4Service::on_ping (cyclomatic 16) reth/crates/net/discv4/src/lib.rs:1002— Discv4Service::on_ping 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.
NetworkManager::on_handle_message (cyclomatic 27) reth/crates/net/network/src/manager.rs:554— NetworkManager::on_handle_message has cyclomatic complexity 27 (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) reth/crates/net/network/src/manager.rs:649— 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.
BeaconConsensusEngine::on_blockchain_tree_action (cyclomatic 25) reth/crates/consensus/beacon/src/engine/mod.rs:1602— BeaconConsensusEngine::on_blockchain_tree_action 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.
BeaconConsensusEngine::poll (cyclomatic 18) reth/crates/consensus/beacon/src/engine/mod.rs:1812— BeaconConsensusEngine::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.
AllTransactions::update (cyclomatic 19) reth/crates/transaction-pool/src/pool/txpool.rs:1081— AllTransactions::update 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) reth/crates/transaction-pool/src/pool/txpool.rs:1529— 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.
TransactionsManager::on_new_pooled_transaction_hashes (cyclomatic 18) reth/crates/net/network/src/transactions/mod.rs:611— 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::import_transactions (cyclomatic 17) reth/crates/net/network/src/transactions/mod.rs:954— TransactionsManager::import_transactions 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.
FixmeComment reth/crates/stages/api/src/pipeline/mod.rs:515— // 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.
FixmeComment nomt/torture/src/supervisor/pbt.rs:60— // FIXME: Ideally we kill not just the child process but the entire process group. — 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.
ActiveSession::poll (cognitive 69) reth/crates/net/network/src/session/active.rs:475— ActiveSession::poll has cognitive complexity 69 (threshold 15). Drivers by points: match/switch 8 (30 pts), if/else 11 (27 pts), loops 7 (12 pts) (nesting depth added 43). 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 38) reth/crates/net/network/src/session/active.rs:124— ActiveSession::on_incoming_message has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 7 (18 pts), boolean chains 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.
BeaconConsensusEngine::on_blockchain_tree_action (cognitive 59) reth/crates/consensus/beacon/src/engine/mod.rs:1602— BeaconConsensusEngine::on_blockchain_tree_action has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 6 (12 pts) (nesting depth added 35). 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.
BeaconConsensusEngine::poll (cognitive 42) reth/crates/consensus/beacon/src/engine/mod.rs:1812— BeaconConsensusEngine::poll has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 4 (16 pts), loops 2 (3 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.
nomt_core::proof::multi_proof::verify_update (cognitive 41) nomt/core/src/proof/multi_proof.rs:696— nomt_core::proof::multi_proof::verify_update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (10 pts) (nesting depth added 25). 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.
nomt_core::proof::path_proof::verify_update (cognitive 33) nomt/core/src/proof/path_proof.rs:267— nomt_core::proof::path_proof::verify_update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (6 pts), match/switch 2 (5 pts), boolean chains 2 (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.
DnsDiscoveryService::poll (cognitive 29) reth/crates/net/dns/src/lib.rs:297— DnsDiscoveryService::poll has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (14 pts), match/switch 3 (10 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 16). 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.
DnsDiscoveryService::on_resolved_entry (cognitive 18) reth/crates/net/dns/src/lib.rs:251— DnsDiscoveryService::on_resolved_entry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (3 pts) (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.
TrieWitness::next_root_from_proofs (cognitive 26) reth/crates/trie/trie/src/witness.rs:281— TrieWitness::next_root_from_proofs has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (12 pts), match/switch 2 (7 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 16). 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.
TrieWitness::target_nodes (cognitive 18) reth/crates/trie/trie/src/witness.rs:204— TrieWitness::target_nodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 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.
SpawnedDownloader::poll (cognitive 25) reth/crates/net/downloaders/src/bodies/task.rs:114— 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) reth/crates/net/downloaders/src/headers/task.rs:120— 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.
Pipeline::execute_stage_to_completion (cognitive 24) reth/crates/stages/api/src/pipeline/mod.rs:371— 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::unwind (cognitive 17) reth/crates/stages/api/src/pipeline/mod.rs:271— Pipeline::unwind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (3 pts), match/switch 1 (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.
reth_stages::stages::sender_recovery::recover_range (cognitive 19) reth/crates/stages/stages/src/stages/sender_recovery.rs:136— reth_stages::stages::sender_recovery::recover_range has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), loops 4 (6 pts), if/else 2 (4 pts) (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.
reth_stages::stages::utils::load_indices (cognitive 18) reth/crates/stages/stages/src/stages/utils.rs:190— reth_stages::stages::utils::load_indices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (2 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.
TooManyFields: WorkloadConfiguration nomt/torture/src/supervisor/config.rs:46— TooManyFields — 33 stored fields beside 8 methods. The bar is 30 stored fields; this is 3 over it, 1.10× 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: RpcServerArgs reth/crates/node/core/src/args/rpc_server.rs:39— TooManyFields — 31 stored fields beside 9 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.
D4 · Code Duplication· Edited copy of a member (86 corresponding lines) · ×2
Edited copy of a member (86 corresponding lines) reth/crates/chainspec/src/spec.rs:592— reth/crates/chainspec/src/spec.rs:592-677 | reth/crates/optimism/chainspec/src/lib.rs:137-226 — These two members are one piece of code written twice and then edited apart: 86 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 (86 corresponding lines) nomt/nomt/src/beatree/ops/update/branch_stage.rs:198— nomt/nomt/src/beatree/ops/update/branch_stage.rs:198-283 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:350-435 — These two members are one piece of code written twice and then edited apart: 86 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 (56 corresponding lines) · ×2
Edited copy of a member (56 corresponding lines) reth/crates/cli/commands/src/import.rs:174— reth/crates/cli/commands/src/import.rs:174-229 | reth/crates/optimism/cli/src/commands/build_pipeline.rs:41-97 — These two members are one piece of code written twice and then edited apart: 56 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 (56 corresponding lines) reth/crates/consensus/beacon/src/engine/sync.rs:288— reth/crates/consensus/beacon/src/engine/sync.rs:288-343 | reth/crates/engine/tree/src/download.rs:196-257 — These two members are one piece of code written twice and then edited apart: 56 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) · ×2
Edited copy of a member (47 corresponding lines) nomt/nomt/src/beatree/branch/node.rs:783— nomt/nomt/src/beatree/branch/node.rs:783-829 | nomt/nomt/src/beatree/ops/mod.rs:163-210 — 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.
Edited copy of a member (47 corresponding lines) reth/crates/evm/src/system_calls/eip7002.rs:67— reth/crates/evm/src/system_calls/eip7002.rs:67-113 | reth/crates/evm/src/system_calls/eip7251.rs:69-119 — 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 (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:593— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:593-633 | reth/crates/rpc/rpc-eth-api/src/helpers/trace.rs:180-239 — 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) reth/crates/ethereum/consensus/src/lib.rs:161— reth/crates/ethereum/consensus/src/lib.rs:161-213 | reth/crates/optimism/consensus/src/lib.rs:81-121 — 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 copy of a member (42 corresponding lines) · ×2
Edited copy of a member (42 corresponding lines) reth/crates/transaction-pool/src/pool/txpool.rs:148— reth/crates/transaction-pool/src/pool/txpool.rs:148-189 | reth/crates/transaction-pool/src/pool/txpool.rs:195-237 — These two members are one piece of code written twice and then edited apart: 42 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 (42 corresponding lines) reth/crates/consensus/beacon/src/engine/mod.rs:1168— reth/crates/consensus/beacon/src/engine/mod.rs:1168-1209 | reth/crates/engine/tree/src/tree/mod.rs:2485-2526 — These two members are one piece of code written twice and then edited apart: 42 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) · ×2
Edited copy of a member (24 corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1512— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1512-1539 | reth/crates/storage/provider/src/providers/mod.rs:850-873 — 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) reth/crates/optimism/node/src/engine.rs:83— reth/crates/optimism/node/src/engine.rs:83-110 | reth/crates/payload/primitives/src/lib.rs:134-157 — 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 (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) nomt/trickfs/src/lib.rs:522— nomt/trickfs/src/lib.rs:522-554 | nomt/trickfs/src/lib.rs:673-702 — 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) reth/crates/transaction-pool/src/pool/pending.rs:178— reth/crates/transaction-pool/src/pool/pending.rs:178-207 | reth/crates/transaction-pool/src/pool/pending.rs:221-253 — 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 (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) reth/crates/rpc/rpc-testing-util/src/trace.rs:449— reth/crates/rpc/rpc-testing-util/src/trace.rs:449-477 | reth/crates/rpc/rpc-testing-util/src/trace.rs:484-512 — 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.
Edited copy of a member (29 corresponding lines) reth/crates/net/network/src/transactions/fetcher.rs:822— reth/crates/net/network/src/transactions/fetcher.rs:822-850 | reth/crates/net/network/src/transactions/fetcher.rs:861-889 — 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 copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) reth/crates/optimism/evm/src/l1.rs:68— reth/crates/optimism/evm/src/l1.rs:68-107 | reth/crates/optimism/evm/src/l1.rs:123-173 — 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.
Edited copy of a member (40 corresponding lines) bench/src/speed/hover_gen.rs:96— bench/src/speed/hover_gen.rs:96-137 | bench/src/speed/hover_gen.rs:155-194 — 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 copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) reth/crates/engine/tree/src/tree/mod.rs:2363— reth/crates/engine/tree/src/tree/mod.rs:2363-2390 | reth/crates/engine/tree/src/tree/mod.rs:2393-2418 — 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) reth/crates/storage/nippy-jar/src/cursor.rs:75— reth/crates/storage/nippy-jar/src/cursor.rs:75-100 | reth/crates/storage/nippy-jar/src/cursor.rs:115-141 — 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 (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) nomt/nomt/src/beatree/ops/update/branch_stage.rs:291— nomt/nomt/src/beatree/ops/update/branch_stage.rs:291-317 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:446-492 — 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) reth/crates/net/ecies/src/algorithm.rs:284— reth/crates/net/ecies/src/algorithm.rs:284-311 | reth/crates/net/ecies/src/algorithm.rs:327-353 — 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 (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) reth/crates/cli/commands/src/stage/dump/execution.rs:139— reth/crates/cli/commands/src/stage/dump/execution.rs:139-161 | reth/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) reth/crates/net/network/src/eth_requests.rs:162— reth/crates/net/network/src/eth_requests.rs:162-184 | reth/crates/net/network/src/eth_requests.rs:191-219 — 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) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) reth/crates/node/core/src/args/database.rs:46— reth/crates/node/core/src/args/database.rs:46-62 | reth/crates/node/core/src/args/debug.rs:242-253 | reth/crates/node/core/src/args/rpc_server.rs:333-344 — 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) reth/crates/chain-state/src/notifications.rs:52— reth/crates/chain-state/src/notifications.rs:52-63 | reth/crates/payload/primitives/src/events.rs:66-81 | reth/crates/payload/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.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×2
Edited copies of one member (5 members, 11+ corresponding lines) reth/crates/primitives/src/transaction/mod.rs:197— reth/crates/primitives/src/transaction/mod.rs:197-207 | reth/crates/primitives/src/transaction/mod.rs:224-235 | reth/crates/primitives/src/transaction/mod.rs:259-269 | reth/crates/primitives/src/transaction/mod.rs:272-283 | reth/crates/primitives/src/transaction/mod.rs:311-321 — 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.
Edited copies of one member (5 members, 11+ corresponding lines) reth/crates/node/core/src/args/pruning.rs:144— reth/crates/node/core/src/args/pruning.rs:144-154 | reth/crates/node/core/src/args/pruning.rs:156-166 | reth/crates/node/core/src/args/pruning.rs:168-178 | reth/crates/node/core/src/args/pruning.rs:180-190 | reth/crates/node/core/src/args/pruning.rs:192-202 — 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 copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) reth/crates/ethereum/payload/src/lib.rs:93— reth/crates/ethereum/payload/src/lib.rs:93-96 | reth/crates/optimism/payload/src/builder.rs:105-114 — 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.
Edited copy of a member (4 corresponding lines) reth/crates/node/core/src/args/debug.rs:255— reth/crates/node/core/src/args/debug.rs:255-258 | reth/crates/node/core/src/args/rpc_server.rs:346-349 — 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 (68 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:743— reth/crates/storage/provider/src/providers/database/provider.rs:743-810 | reth/crates/storage/provider/src/providers/database/provider.rs:1242-1309 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:743` 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 (68 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:3168— reth/crates/storage/provider/src/providers/database/provider.rs:3168-3235 | reth/crates/storage/provider/src/providers/database/provider.rs:3256-3323 — 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 (47 lines × 2) reth/crates/node/builder/src/launch/engine.rs:137— reth/crates/node/builder/src/launch/engine.rs:137-183 | reth/crates/node/builder/src/launch/mod.rs:176-222 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 `reth/crates/node/builder/src/launch/engine.rs:137` 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 (47 lines × 2) reth/crates/node/builder/src/launch/engine.rs:236— reth/crates/node/builder/src/launch/engine.rs:236-282 | reth/crates/node/builder/src/launch/mod.rs:313-359 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 (30 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:147— nomt/nomt/src/beatree/ops/update/branch_stage.rs:147-176 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:225-254 — before extracting anything, compare `nomt/nomt/src/beatree/ops/update/branch_stage.rs` and `nomt/nomt/src/beatree/ops/update/leaf_stage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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 (30 lines × 2) reth/crates/storage/libmdbx-rs/src/cursor.rs:565— reth/crates/storage/libmdbx-rs/src/cursor.rs:565-594 | reth/crates/storage/libmdbx-rs/src/cursor.rs:660-689 — 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 (27 lines × 2) reth/crates/consensus/beacon/src/engine/mod.rs:1183— reth/crates/consensus/beacon/src/engine/mod.rs:1183-1209 | reth/crates/engine/tree/src/tree/mod.rs:2500-2526 — before extracting anything, compare `reth/crates/consensus/beacon/src/engine/mod.rs` and `reth/crates/engine/tree/src/tree/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 `reth/crates/consensus/beacon/src/engine/mod.rs:1183` 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 (27 lines × 2) reth/crates/node/builder/src/launch/engine.rs:109— reth/crates/node/builder/src/launch/engine.rs:109-135 | reth/crates/node/builder/src/launch/mod.rs:148-174 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 `reth/crates/node/builder/src/launch/engine.rs:109` 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, `reth/crates/node/builder/src/launch/mod.rs:143` calls `with_canon_state_notifications`, `clone` and `reth/crates/node/builder/src/launch/engine.rs:106` 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 (25 lines × 2) reth/crates/node/builder/src/launch/engine.rs:295— reth/crates/node/builder/src/launch/engine.rs:295-319 | reth/crates/node/builder/src/launch/mod.rs:384-408 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 `reth/crates/node/builder/src/launch/engine.rs:295` 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) bench/src/bin/speed.rs:1082— bench/src/bin/speed.rs:1082-1106 | bench/src/bin/speed.rs:1543-1567 — 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) reth/crates/ethereum/evm/src/lib.rs:71— reth/crates/ethereum/evm/src/lib.rs:71-89 | reth/crates/optimism/evm/src/lib.rs:69-87 — 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 (19 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:2548— reth/crates/storage/provider/src/providers/database/provider.rs:2548-2566 | reth/crates/storage/provider/src/providers/database/provider.rs:2641-2659 — 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–19 lines × 2) reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:171— reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:171-189 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:199-215 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:215` calls `unwrap_or_default`, `into_inner` and `reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:189` 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 (17–19 lines × 2) reth/crates/storage/provider/src/providers/static_file/writer.rs:227— reth/crates/storage/provider/src/providers/static_file/writer.rs:227-243 | reth/crates/storage/provider/src/providers/static_file/writer.rs:259-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 `reth/crates/storage/provider/src/providers/static_file/writer.rs:259` 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–15 lines × 2) nomt/nomt/src/beatree/branch/node.rs:789— nomt/nomt/src/beatree/branch/node.rs:789-801 | nomt/nomt/src/beatree/ops/mod.rs:166-180 — 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 `nomt/nomt/src/beatree/branch/node.rs:789` 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–15 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:1887— reth/crates/storage/provider/src/providers/database/provider.rs:1887-1899 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1399-1413 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:1887` 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 (10 lines × 3) reth/crates/cli/commands/src/stage/dump/execution.rs:35— reth/crates/cli/commands/src/stage/dump/execution.rs:35-44 | reth/crates/cli/commands/src/stage/dump/hashing_account.rs:36-45 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:26-35 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/execution.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `reth/crates/cli/commands/src/stage/dump/execution.rs:35` 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 × 3) reth/crates/node/builder/src/launch/engine.rs:187— reth/crates/node/builder/src/launch/engine.rs:187-196 | reth/crates/node/builder/src/launch/mod.rs:248-257 | reth/crates/node/builder/src/launch/mod.rs:269-278 — before extracting anything, compare `reth/crates/node/builder/src/launch/engine.rs` and `reth/crates/node/builder/src/launch/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 198 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 `reth/crates/node/builder/src/launch/engine.rs:187` 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 × 4) reth/crates/cli/commands/src/stage/dump/execution.rs:37— reth/crates/cli/commands/src/stage/dump/execution.rs:37-45 | reth/crates/cli/commands/src/stage/dump/hashing_account.rs:38-46 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:28-36 | reth/crates/cli/commands/src/stage/dump/merkle.rs:55-63 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/execution.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `reth/crates/cli/commands/src/stage/dump/execution.rs:37` 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 × 4) reth/crates/storage/provider/src/test_utils/blocks.rs:295— reth/crates/storage/provider/src/test_utils/blocks.rs:295-303 | reth/crates/storage/provider/src/test_utils/blocks.rs:362-370 | reth/crates/storage/provider/src/test_utils/blocks.rs:455-463 | reth/crates/storage/provider/src/test_utils/blocks.rs:543-551 — 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.
Hollow method — returns a constant without doing the work reth/crates/cli/commands/src/dump_genesis.rs:26— `execute` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work reth/crates/net/downloaders/src/bodies/task.rs:90— `set_download_range` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
AXI1 · Runtime container hardening· Container process runs as root · ×1
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).
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.
AdminApi::node_info (cyclomatic 69) reth/crates/rpc/rpc/src/admin.rs:108— AdminApi::node_info has cyclomatic complexity 69 (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.
EthTransactionValidatorInner::validate_one (cyclomatic 41) reth/crates/transaction-pool/src/validate/eth.rs:155— EthTransactionValidatorInner::validate_one 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.
RlpxSatelliteStream::poll_next (cyclomatic 29) reth/crates/net/eth-wire/src/multiplex.rs:458— RlpxSatelliteStream::poll_next has cyclomatic complexity 29 (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 28) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:417— EthStateCacheService::poll has cyclomatic complexity 28 (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 24) reth/crates/transaction-pool/src/maintain.rs:91— reth_transaction_pool::maintain::maintain_transaction_pool 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.
reth_cli_commands::db::tui::handle_event (cyclomatic 21) reth/crates/cli/commands/src/db/tui.rs:273— 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.
ReverseHeadersDownloader::poll_next (cyclomatic 21) reth/crates/net/downloaders/src/headers/reverse_headers.rs:747— 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.
reth_optimism_evm::config::revm_spec (cyclomatic 20) reth/crates/optimism/evm/src/config.rs:31— reth_optimism_evm::config::revm_spec 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.
Call::estimate_gas_with (cyclomatic 20) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:704— Call::estimate_gas_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.
reth_rpc_eth_types::simulate::resolve_transactions (cyclomatic 20) reth/crates/rpc/rpc-eth-types/src/simulate.rs:61— reth_rpc_eth_types::simulate::resolve_transactions 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.
nomt_core::proof::path_proof::verify_update (cyclomatic 19) nomt/core/src/proof/path_proof.rs:267— nomt_core::proof::path_proof::verify_update 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_optimism_payload_builder::builder::optimism_payload (cyclomatic 19) reth/crates/optimism/payload/src/builder.rs:157— reth_optimism_payload_builder::builder::optimism_payload 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.
IpcConnDriver::poll (cyclomatic 19) reth/crates/rpc/ipc/src/server/connection.rs:91— IpcConnDriver::poll 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.
StreamCodec::decode (cyclomatic 19) reth/crates/rpc/ipc/src/stream_codec.rs:78— StreamCodec::decode has cyclomatic complexity 19 (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.
SeekRequest::continue_leaves_fetch (cyclomatic 18) nomt/nomt/src/merkle/seek.rs:266— SeekRequest::continue_leaves_fetch has cyclomatic complexity 18 (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.
Workload::gen_key_value_change (cyclomatic 17) nomt/torture/src/supervisor/workload.rs:947— Workload::gen_key_value_change has cyclomatic complexity 17 (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.
SessionManager::poll (cyclomatic 17) reth/crates/net/network/src/session/mod.rs:381— SessionManager::poll has cyclomatic complexity 17 (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.
EthFees::fee_history (cyclomatic 17) reth/crates/rpc/rpc-eth-api/src/helpers/fee.rs:51— EthFees::fee_history 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.
BodyStage::execute (cyclomatic 17) reth/crates/stages/stages/src/stages/bodies.rs:112— BodyStage::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.
DatabaseEnv::open (cyclomatic 17) reth/crates/storage/db/src/implementation/mdbx/mod.rs:253— DatabaseEnv::open has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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.
EnvironmentBuilder::open_with_permissions (cyclomatic 17) reth/crates/storage/libmdbx-rs/src/environment.rs:600— 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.
StaticFileProvider::check_consistency (cyclomatic 17) reth/crates/storage/provider/src/providers/static_file/manager.rs:630— StaticFileProvider::check_consistency 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.
RlpxSatelliteStream::poll_next (cognitive 73) reth/crates/net/eth-wire/src/multiplex.rs:458— RlpxSatelliteStream::poll_next has cognitive complexity 73 (threshold 15). Drivers by points: if/else 12 (40 pts), loops 7 (18 pts), match/switch 4 (13 pts), boolean chains 2 (nesting depth added 48). 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 71) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:417— EthStateCacheService::poll has cognitive complexity 71 (threshold 15). Drivers by points: if/else 10 (40 pts), loops 6 (22 pts), match/switch 3 (9 pts) (nesting depth added 52). 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.
EthTransactionValidatorInner::validate_one (cognitive 56) reth/crates/transaction-pool/src/validate/eth.rs:155— EthTransactionValidatorInner::validate_one has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30 (47 pts), match/switch 5 (8 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.
reth_transaction_pool::maintain::maintain_transaction_pool (cognitive 51) reth/crates/transaction-pool/src/maintain.rs:91— reth_transaction_pool::maintain::maintain_transaction_pool has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (32 pts), match/switch 4 (9 pts), loops 3 (8 pts), boolean chains 2 (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.
AdminApi::node_info (cognitive 50) reth/crates/rpc/rpc/src/admin.rs:108— AdminApi::node_info has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 17 (33 pts), if/else 17 (nesting depth added 16). 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.
IpcConnDriver::poll (cognitive 46) reth/crates/rpc/ipc/src/server/connection.rs:91— IpcConnDriver::poll has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 5 (18 pts), loops 3 (5 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.
reth_optimism_payload_builder::builder::optimism_payload (cognitive 42) reth/crates/optimism/payload/src/builder.rs:157— reth_optimism_payload_builder::builder::optimism_payload has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (12 pts), loops 2 (3 pts), boolean chains 2 (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.
ReverseHeadersDownloader::poll_next (cognitive 39) reth/crates/net/downloaders/src/headers/reverse_headers.rs:747— 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.
BodyStage::execute (cognitive 39) reth/crates/stages/stages/src/stages/bodies.rs:112— BodyStage::execute has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (30 pts), match/switch 3 (5 pts), loops 2 (4 pts) (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.
Call::estimate_gas_with (cognitive 37) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:704— Call::estimate_gas_with has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 18). 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.
NetworkState::poll (cognitive 36) reth/crates/net/network/src/state.rs:417— NetworkState::poll has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 7 (13 pts), match/switch 2 (7 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.
StreamCodec::decode (cognitive 34) reth/crates/rpc/ipc/src/stream_codec.rs:78— StreamCodec::decode has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7, match/switch 2 (7 pts), loops 1 (2 pts) (nesting depth added 14). 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.
FetchFullBlockFuture::poll (cognitive 33) reth/crates/net/p2p/src/full_block.rs:177— 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.
BranchOpsTracker::extract_ops_until (cognitive 32) nomt/nomt/src/beatree/ops/update/branch_ops.rs:201— BranchOpsTracker::extract_ops_until has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 1 (2 pts), boolean chains 1, 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.
reth_ethereum_payload_builder::default_ethereum_payload (cognitive 32) reth/crates/ethereum/payload/src/lib.rs:125— reth_ethereum_payload_builder::default_ethereum_payload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 2 (5 pts), loops 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.
LoadPendingBlock::build_block (cognitive 32) reth/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs:223— LoadPendingBlock::build_block has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 3 (6 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.
MiningTask::poll (cognitive 31) reth/crates/consensus/auto-seal/src/task.rs:93— MiningTask::poll has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 4 (17 pts), if/else 4 (9 pts), loops 2 (5 pts) (nesting depth added 21). 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.
EthRequestHandler::get_headers_response (cognitive 30) reth/crates/net/network/src/eth_requests.rs:87— EthRequestHandler::get_headers_response has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 2 (4 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.
EthFees::fee_history (cognitive 30) reth/crates/rpc/rpc-eth-api/src/helpers/fee.rs:51— EthFees::fee_history has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 3 (8 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.
UpdateHandle::join (cognitive 29) nomt/nomt/src/merkle/mod.rs:379— UpdateHandle::join has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 3 (8 pts) (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.
ForkFilter::validate (cognitive 29) reth/crates/ethereum-forks/src/forkid.rs:319— ForkFilter::validate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, match/switch 1 (3 pts), loops 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.
RangeUpdater::update (cognitive 28) nomt/nomt/src/merkle/worker.rs:444— RangeUpdater::update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (5 pts), boolean chains 3, 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.
PendingPool::remove_to_limit (cognitive 28) reth/crates/transaction-pool/src/pool/pending.rs:365— PendingPool::remove_to_limit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (9 pts), boolean chains 3 (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.
ReadTransactions::start_monitor (cognitive 27) reth/crates/storage/libmdbx-rs/src/txn_manager.rs:204— ReadTransactions::start_monitor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), match/switch 1 (4 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.
ReceiptFileClient::from_receipt_reader (cognitive 26) reth/crates/net/downloaders/src/receipt_file_client.rs:59— 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.
torture::supervisor::control_loop (cognitive 25) nomt/torture/src/supervisor/mod.rs:230— torture::supervisor::control_loop has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (7 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.
FetchFullBlockRangeFuture::poll (cognitive 25) reth/crates/net/p2p/src/full_block.rs:574— FetchFullBlockRangeFuture::poll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 3 (8 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 25) reth/crates/payload/builder/src/service.rs:367— PayloadBuilderService::poll has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 3 (11 pts), if/else 3 (7 pts), loops 4 (7 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.
TransactionLookupStage::execute (cognitive 25) reth/crates/stages/stages/src/stages/tx_lookup.rs:72— TransactionLookupStage::execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (6 pts), boolean chains 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.
SeekRequest::continue_leaves_fetch (cognitive 24) nomt/nomt/src/merkle/seek.rs:266— SeekRequest::continue_leaves_fetch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (8 pts), match/switch 3 (7 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.
EnvironmentBuilder::open_with_permissions (cognitive 24) reth/crates/storage/libmdbx-rs/src/environment.rs:600— 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.
EthFilterInner::get_logs_in_block_range (cognitive 23) reth/crates/rpc/rpc/src/eth/filter.rs:454— EthFilterInner::get_logs_in_block_range has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (4 pts), loops 2 (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.
EthCall::simulate_v1 (cognitive 23) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:61— EthCall::simulate_v1 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (3 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.
MultiProof::verify (cognitive 22) crates/qmdb-common/src/merkletree/multiproof.rs:329— MultiProof::verify has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (7 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.
NetworkManager::on_swarm_event (cognitive 22) reth/crates/net/network/src/manager.rs:649— NetworkManager::on_swarm_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 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.
DB::prepare_sync (cognitive 21) nomt/nomt/src/bitbox/mod.rs:174— DB::prepare_sync has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 6 (9 pts), loops 2 (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.
Seeker::submit_key_path_request (cognitive 21) nomt/nomt/src/merkle/seek.rs:689— Seeker::submit_key_path_request has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 3 (5 pts), loops 1 (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.
BlockchainTree::make_canonical (cognitive 21) reth/crates/blockchain-tree/src/blockchain_tree.rs:1021— BlockchainTree::make_canonical has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 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_cli_commands::db::tui::handle_event (cognitive 21) reth/crates/cli/commands/src/db/tui.rs:273— reth_cli_commands::db::tui::handle_event has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 4 (9 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.
ExExManager::poll (cognitive 21) reth/crates/exex/exex/src/manager.rs:419— ExExManager::poll has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (6 pts), match/switch 2 (6 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.
reth_discv4::receive_loop (cognitive 21) reth/crates/net/discv4/src/lib.rs:1809— reth_discv4::receive_loop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 3 (7 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.
BodiesDownloader::poll_next (cognitive 21) reth/crates/net/downloaders/src/bodies/bodies.rs:353— 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.
ECIESCodec::decode (cognitive 21) reth/crates/net/ecies/src/codec.rs:54— ECIESCodec::decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), 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.
Discovery::poll (cognitive 21) reth/crates/net/network/src/discovery.rs:248— Discovery::poll has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (7 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.
TransactionFetcher::filter_unseen_and_pending_hashes (cognitive 21) reth/crates/net/network/src/transactions/fetcher.rs:516— TransactionFetcher::filter_unseen_and_pending_hashes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts) (nesting depth added 11). 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.
EthBundle::call_bundle (cognitive 21) reth/crates/rpc/rpc/src/eth/bundle.rs:55— EthBundle::call_bundle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 1 (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.
TrieNodeIter::try_next (cognitive 21) reth/crates/trie/trie/src/node_iter.rs:85— TrieNodeIter::try_next has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), boolean chains 1, 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.
InvalidBlockWitnessHook::on_invalid_block (cognitive 20) reth/crates/engine/invalid-block-hooks/src/witness.rs:59— InvalidBlockWitnessHook::on_invalid_block has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (7 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.
QueryPool::poll (cognitive 20) reth/crates/net/dns/src/query.rs:74— QueryPool::poll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 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.
reth_optimism_evm::config::revm_spec (cognitive 20) reth/crates/optimism/evm/src/config.rs:31— reth_optimism_evm::config::revm_spec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
reth_prune::segments::user::history::prune_shard (cognitive 20) reth/crates/prune/prune/src/segments/user/history.rs:81— 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.
EngineSyncController::poll (cognitive 19) reth/crates/consensus/beacon/src/engine/sync.rs:288— EngineSyncController::poll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (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.
EngineNodeLauncher::launch_node (cognitive 19) reth/crates/node/builder/src/launch/engine.rs:86— EngineNodeLauncher::launch_node has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (5 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.
ResolveBestPayload::poll (cognitive 19) reth/crates/payload/basic/src/lib.rs:569— ResolveBestPayload::poll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (3 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.
reth_rpc::eth::pubsub::handle_accepted (cognitive 19) reth/crates/rpc/rpc/src/eth/pubsub.rs:101— reth_rpc::eth::pubsub::handle_accepted has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (6 pts), loops 1 (2 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.
AccountHashingStage::execute (cognitive 19) reth/crates/stages/stages/src/stages/hashing_account.rs:141— AccountHashingStage::execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 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.
StorageHashingStage::execute (cognitive 19) reth/crates/stages/stages/src/stages/hashing_storage.rs:75— StorageHashingStage::execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 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.
DatabaseEnv::open (cognitive 19) reth/crates/storage/db/src/implementation/mdbx/mod.rs:253— DatabaseEnv::open has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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.
LeafUpdater::consume_and_update_until (cognitive 18) nomt/nomt/src/beatree/ops/update/leaf_updater.rs:309— LeafUpdater::consume_and_update_until has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, 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.
BodiesRequestFuture::poll (cognitive 18) reth/crates/net/downloaders/src/bodies/request.rs:214— 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.
ReceiptsByLogs::prune (cognitive 18) reth/crates/prune/prune/src/segments/user/receipts_by_logs.rs:42— ReceiptsByLogs::prune has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), loops 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.
reth_ipc::server::ipc::process_batch_request (cognitive 18) reth/crates/rpc/ipc/src/server/ipc.rs:35— reth_ipc::server::ipc::process_batch_request has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (3 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.
BlockchainProvider2::get_in_memory_or_storage_by_tx (cognitive 18) reth/crates/storage/provider/src/providers/blockchain_provider.rs:511— BlockchainProvider2::get_in_memory_or_storage_by_tx has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), match/switch 1 (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.
StaticFileProviderRW::truncate (cognitive 18) reth/crates/storage/provider/src/providers/static_file/writer.rs:382— StaticFileProviderRW::truncate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 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.
Entry::dump_compare (cognitive 17) crates/qmdb-common/src/entryfile/entry.rs:188— Entry::dump_compare has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (3 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.
BasicBlockDownloader::poll (cognitive 17) reth/crates/engine/tree/src/download.rs:196— BasicBlockDownloader::poll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (5 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.
EngineReorg::poll_next (cognitive 17) reth/crates/engine/util/src/reorg.rs:113— 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.
NodeState::handle_pipeline_event (cognitive 17) reth/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.
GasPriceOracle::suggest_tip_cap (cognitive 17) reth/crates/rpc/rpc-eth-types/src/gas_oracle.rs:119— GasPriceOracle::suggest_tip_cap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 1 (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.
reth_db::static_file::iter_static_files (cognitive 17) reth/crates/storage/db/src/static_file/mod.rs:28— reth_db::static_file::iter_static_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (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.
DbTool::list (cognitive 17) reth/crates/storage/db-common/src/db_tool/mod.rs:37— 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.
BlobTransactions::satisfy_attributes (cognitive 17) reth/crates/transaction-pool/src/pool/blob.rs:86— 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.
qmdb_common::merkletree::multiproof::verify_partial_merkle_tree (cognitive 16) crates/qmdb-common/src/merkletree/multiproof.rs:159— qmdb_common::merkletree::multiproof::verify_partial_merkle_tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (step). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FreeList::preallocate (cognitive 16) nomt/nomt/src/beatree/allocator/free_list.rs:205— FreeList::preallocate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 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.
LeafIterator::next (cognitive 16) nomt/nomt/src/beatree/iterator.rs:237— LeafIterator::next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (4 pts) (nesting depth added 6). 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.
BlockIndices::update_block_hashes (cognitive 16) reth/crates/blockchain-tree/src/block_indices.rs:136— BlockIndices::update_block_hashes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (7 pts), match/switch 1 (2 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.
RlpxProtocolMultiplexer::into_satellite_stream_with_tuple_handshake (cognitive 16) reth/crates/net/eth-wire/src/multiplex.rs:137— RlpxProtocolMultiplexer::into_satellite_stream_with_tuple_handshake 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.
P2PStream::poll_next (cognitive 16) reth/crates/net/eth-wire/src/p2pstream.rs:388— P2PStream::poll_next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 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.
Swarm::poll_next (cognitive 16) reth/crates/net/network/src/swarm.rs:294— Swarm::poll_next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (4 pts), loops 2 (3 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.
ExecutionPayloadValidator::ensure_well_formed_payload (cognitive 16) reth/crates/payload/validator/src/lib.rs:111— ExecutionPayloadValidator::ensure_well_formed_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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.
HeaderStage::write_headers (cognitive 16) reth/crates/stages/stages/src/stages/headers.rs:93— HeaderStage::write_headers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 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_codecs_derive::compact::should_use_alt_impl (cognitive 16) reth/crates/storage/codecs/derive/src/compact/mod.rs:165— reth_codecs_derive::compact::should_use_alt_impl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1 (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.
reth_provider::providers::database::provider::recover_block_senders (cognitive 16) reth/crates/storage/provider/src/providers/database/provider.rs:3665— reth_provider::providers::database::provider::recover_block_senders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (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.
Near-duplicate member pair (198 shared lines) reth/crates/node/builder/src/launch/engine.rs:89— reth/crates/node/builder/src/launch/engine.rs:89-418 | reth/crates/node/builder/src/launch/mod.rs:124-451 — These two members are variants of one another: 198 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 (96 shared lines) reth/crates/ethereum/payload/src/lib.rs:135— reth/crates/ethereum/payload/src/lib.rs:135-443 | reth/crates/optimism/payload/src/builder.rs:168-543 — These two members are variants of one another: 96 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) reth/crates/prune/prune/src/segments/user/account_history.rs:51— reth/crates/prune/prune/src/segments/user/account_history.rs:51-126 | reth/crates/prune/prune/src/segments/user/storage_history.rs:51-131 — 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.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) reth/crates/ethereum-forks/src/forkid.rs:137— reth/crates/ethereum-forks/src/forkid.rs:137-163 | reth/crates/net/discv4/src/proto.rs:281-307 | reth/crates/net/discv4/src/proto.rs:323-349 | reth/crates/net/discv4/src/proto.rs:366-392 | reth/crates/net/discv4/src/proto.rs:474-508 | reth/crates/net/discv4/src/proto.rs:553-584 — These 6 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 6 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 6 times.
D4 · Code Duplication· Edited copy of a member (92 corresponding lines) · ×1
Edited copy of a member (92 corresponding lines) reth/crates/storage/provider/src/providers/database/provider.rs:719— reth/crates/storage/provider/src/providers/database/provider.rs:719-810 | reth/crates/storage/provider/src/providers/database/provider.rs:1212-1309 — These two members are one piece of code written twice and then edited apart: 92 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 (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding lines) reth/crates/storage/provider/src/providers/database/provider.rs:3167— reth/crates/storage/provider/src/providers/database/provider.rs:3167-3250 | reth/crates/storage/provider/src/providers/database/provider.rs:3255-3338 — These two members are one piece of code written twice and then edited apart: 84 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 (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) reth/crates/stages/stages/src/stages/hashing_account.rs:141— reth/crates/stages/stages/src/stages/hashing_account.rs:141-225 | reth/crates/stages/stages/src/stages/hashing_storage.rs:75-161 — These two members are one piece of code written twice and then edited apart: 85 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 (89 corresponding lines) · ×1
Edited copy of a member (89 corresponding lines) reth/crates/cli/commands/src/import.rs:66— reth/crates/cli/commands/src/import.rs:66-154 | reth/crates/optimism/cli/src/commands/import.rs:47-149 — These two members are one piece of code written twice and then edited apart: 89 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) reth/crates/storage/provider/src/providers/database/provider.rs:652— reth/crates/storage/provider/src/providers/database/provider.rs:652-710 | reth/crates/storage/provider/src/providers/database/provider.rs:1086-1158 — 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 (119 corresponding lines) · ×1
Edited copy of a member (119 corresponding lines) nomt/nomt/src/beatree/ops/update/branch_stage.rs:348— nomt/nomt/src/beatree/ops/update/branch_stage.rs:348-466 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:562-697 — These two members are one piece of code written twice and then edited apart: 119 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 (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) reth/crates/storage/provider/src/providers/database/provider.rs:2542— reth/crates/storage/provider/src/providers/database/provider.rs:2542-2611 | reth/crates/storage/provider/src/providers/database/provider.rs:2634-2726 — These two members are one piece of code written twice and then edited apart: 70 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 (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:226— reth/crates/storage/provider/src/providers/blockchain_provider.rs:226-282 | reth/crates/storage/provider/src/providers/database/provider.rs:913-979 — These two members are one piece of code written twice and then edited apart: 57 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 (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) reth/crates/stages/stages/src/stages/index_account_history.rs:60— reth/crates/stages/stages/src/stages/index_account_history.rs:60-126 | reth/crates/stages/stages/src/stages/index_storage_history.rs:62-132 — 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 (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) reth/crates/ethereum/node/src/node.rs:156— reth/crates/ethereum/node/src/node.rs:156-210 | reth/crates/optimism/node/src/node.rs:182-244 — These two members are one piece of code written twice and then edited apart: 55 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) nomt/nomt/src/lib.rs:770— nomt/nomt/src/lib.rs:770-813 | nomt/nomt/src/lib.rs:825-873 — These two members are one piece of code written twice and then edited apart: 44 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 (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) reth/crates/consensus/beacon/src/engine/mod.rs:652— reth/crates/consensus/beacon/src/engine/mod.rs:652-722 | reth/crates/engine/tree/src/tree/mod.rs:1834-1901 — These two members are one piece of code written twice and then edited apart: 68 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) reth/crates/net/peers/src/node_record.rs:163— reth/crates/net/peers/src/node_record.rs:163-196 | reth/crates/net/peers/src/trusted_peer.rs:130-163 — These two members are one piece of code written twice and then edited apart: 34 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) · ×1
Edited copy of a member (32 corresponding lines) reth/crates/storage/provider/src/providers/database/provider.rs:3026— reth/crates/storage/provider/src/providers/database/provider.rs:3026-3057 | reth/crates/storage/provider/src/providers/database/provider.rs:3072-3107 — 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 (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) reth/crates/net/network/src/session/mod.rs:230— reth/crates/net/network/src/session/mod.rs:230-276 | reth/crates/net/network/src/session/mod.rs:279-317 — 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) · ×1
Edited copy of a member (35 corresponding lines) reth/crates/storage/codecs/derive/src/compact/enums.rs:51— reth/crates/storage/codecs/derive/src/compact/enums.rs:51-88 | reth/crates/storage/codecs/derive/src/compact/enums.rs:94-128 — 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 (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1593— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1593-1637 | reth/crates/storage/provider/src/providers/blockchain_provider.rs:1644-1680 — 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 copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) reth/crates/evm/src/system_calls/eip2935.rs:39— reth/crates/evm/src/system_calls/eip2935.rs:39-76 | reth/crates/evm/src/system_calls/eip7002.rs:25-63 | reth/crates/evm/src/system_calls/eip7251.rs:26-65 — 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 copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) reth/crates/transaction-pool/src/pool/blob.rs:89— reth/crates/transaction-pool/src/pool/blob.rs:89-119 | reth/crates/transaction-pool/src/pool/blob.rs:147-169 | reth/crates/transaction-pool/src/pool/parked.rs:289-309 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) reth/crates/storage/provider/src/providers/blockchain_provider.rs:1409— reth/crates/storage/provider/src/providers/blockchain_provider.rs:1409-1432 | reth/crates/storage/provider/src/providers/mod.rs:646-670 | reth/crates/storage/provider/src/test_utils/mock.rs:776-797 | reth/crates/storage/provider/src/test_utils/noop.rs:487-508 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 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 (5 members, 19+ corresponding lines) · ×1
Edited copies of one member (5 members, 19+ corresponding lines) reth/crates/storage/db/src/implementation/mdbx/cursor.rs:244— reth/crates/storage/db/src/implementation/mdbx/cursor.rs:244-264 | reth/crates/storage/db/src/implementation/mdbx/cursor.rs:266-286 | reth/crates/storage/db/src/implementation/mdbx/cursor.rs:290-310 | reth/crates/storage/db/src/implementation/mdbx/cursor.rs:326-346 | reth/crates/storage/db/src/implementation/mdbx/tx.rs:343-361 — These 5 members are one piece of code written 5 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 5 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) reth/crates/ethereum/evm/src/lib.rs:68— reth/crates/ethereum/evm/src/lib.rs:68-100 | reth/crates/optimism/evm/src/lib.rs:67-104 — 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 (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) reth/crates/cli/commands/src/stage/dump/hashing_account.rs:83— reth/crates/cli/commands/src/stage/dump/hashing_account.rs:83-105 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:78-100 | reth/crates/cli/commands/src/stage/dump/merkle.rs:153-175 — 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 (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) reth/crates/trie/trie/src/hashed_cursor/post_state.rs:78— reth/crates/trie/trie/src/hashed_cursor/post_state.rs:78-98 | reth/crates/trie/trie/src/hashed_cursor/post_state.rs:214-233 | reth/crates/trie/trie/src/trie_cursor/in_memory.rs:80-96 — 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, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:284— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:284-307 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:319-342 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:354-377 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) reth/crates/primitives/src/transaction/mod.rs:555— reth/crates/primitives/src/transaction/mod.rs:555-565 | reth/crates/primitives/src/transaction/mod.rs:581-591 | reth/crates/primitives/src/transaction/mod.rs:594-604 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 26+ corresponding lines) · ×1
Edited copies of one member (3 members, 26+ corresponding lines) reth/crates/storage/nippy-jar/src/compression/lz4.rs:10— reth/crates/storage/nippy-jar/src/compression/lz4.rs:10-35 | reth/crates/storage/nippy-jar/src/compression/lz4.rs:53-78 | reth/crates/storage/nippy-jar/src/compression/zstd.rs:123-148 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) reth/crates/storage/provider/src/providers/static_file/jar.rs:103— reth/crates/storage/provider/src/providers/static_file/jar.rs:103-116 | reth/crates/storage/provider/src/providers/static_file/jar.rs:129-147 | reth/crates/storage/provider/src/providers/static_file/jar.rs:261-274 | reth/crates/storage/provider/src/providers/static_file/jar.rs:316-327 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) reth/crates/trie/db/src/proof.rs:51— reth/crates/trie/db/src/proof.rs:51-65 | reth/crates/trie/db/src/proof.rs:71-85 | reth/crates/trie/db/src/witness.rs:34-48 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 17+ corresponding lines) · ×1
Edited copies of one member (5 members, 17+ corresponding lines) reth/crates/storage/provider/src/providers/static_file/writer.rs:547— reth/crates/storage/provider/src/providers/static_file/writer.rs:547-563 | reth/crates/storage/provider/src/providers/static_file/writer.rs:575-591 | reth/crates/storage/provider/src/providers/static_file/writer.rs:693-709 | reth/crates/storage/provider/src/providers/static_file/writer.rs:716-732 | reth/crates/storage/provider/src/providers/static_file/writer.rs:735-751 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:714— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:714-721 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:729-736 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:745-752 — These 3 members are one piece of code written 3 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 3 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) reth/testing/testing-utils/src/genesis_allocator.rs:72— reth/testing/testing-utils/src/genesis_allocator.rs:72-80 | reth/testing/testing-utils/src/genesis_allocator.rs:89-98 | reth/testing/testing-utils/src/genesis_allocator.rs:107-118 | reth/testing/testing-utils/src/genesis_allocator.rs:127-138 | reth/testing/testing-utils/src/genesis_allocator.rs:143-151 — 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 (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) nomt/nomt/src/merkle/page_walker.rs:260— nomt/nomt/src/merkle/page_walker.rs:260-268 | nomt/nomt/src/merkle/page_walker.rs:290-298 | nomt/nomt/src/merkle/page_walker.rs:306-315 — 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 (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:135— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:135-145 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:151-161 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:169-183 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:191-205 — 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.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) reth/crates/primitives/src/block.rs:86— reth/crates/primitives/src/block.rs:86-95 | reth/crates/primitives/src/block.rs:403-412 | reth/crates/primitives/src/traits/block/mod.rs:83-92 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 11+ corresponding lines) · ×1
Edited copies of one member (6 members, 11+ corresponding lines) reth/crates/storage/provider/src/providers/static_file/manager.rs:1227— reth/crates/storage/provider/src/providers/static_file/manager.rs:1227-1237 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1248-1258 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1269-1279 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1319-1329 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1432-1442 | reth/crates/storage/provider/src/providers/static_file/manager.rs:1447-1457 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Duplicated block (51–56 lines × 2) reth/crates/chainspec/src/spec.rs:594— reth/crates/chainspec/src/spec.rs:594-644 | reth/crates/optimism/chainspec/src/lib.rs:144-199 — 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 (38–39 lines × 2) reth/crates/ethereum/node/src/node.rs:173— reth/crates/ethereum/node/src/node.rs:173-210 | reth/crates/optimism/node/src/node.rs:206-244 — 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 `reth/crates/ethereum/node/src/node.rs:173` 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 (37 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:2569— reth/crates/storage/provider/src/providers/database/provider.rs:2569-2605 | reth/crates/storage/provider/src/providers/database/provider.rs:2664-2700 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:2569` 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 (31–35 lines × 2) reth/crates/ethereum/consensus/src/lib.rs:173— reth/crates/ethereum/consensus/src/lib.rs:173-207 | reth/crates/optimism/consensus/src/lib.rs:87-117 — 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 `reth/crates/ethereum/consensus/src/lib.rs:173` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/ethereum/consensus/src/lib.rs:209` calls `validate_header_extradata` and `reth/crates/optimism/consensus/src/lib.rs:118` 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 (32–33 lines × 2) reth/crates/ethereum/evm/src/config.rs:27— reth/crates/ethereum/evm/src/config.rs:27-59 | reth/crates/optimism/evm/src/config.rs:45-76 — 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 `reth/crates/optimism/evm/src/config.rs:45` 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 (33 lines × 2) reth/crates/ethereum/payload/src/lib.rs:232— reth/crates/ethereum/payload/src/lib.rs:232-264 | reth/crates/optimism/payload/src/builder.rs:360-392 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/ethereum/payload/src/lib.rs:232` 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 (29 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:682— reth/crates/storage/provider/src/providers/database/provider.rs:682-710 | reth/crates/storage/provider/src/providers/database/provider.rs:1130-1158 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:682` 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 (28 lines × 2) reth/crates/cli/commands/src/import.rs:175— reth/crates/cli/commands/src/import.rs:175-202 | reth/crates/optimism/cli/src/commands/build_pipeline.rs:42-69 — 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, `reth/crates/optimism/cli/src/commands/build_pipeline.rs:70` calls `optimism`, `chain_spec` and `reth/crates/cli/commands/src/import.rs:204` 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 (26 lines × 4) reth/crates/optimism/hardforks/src/hardfork.rs:64— reth/crates/optimism/hardforks/src/hardfork.rs:64-89 | reth/crates/optimism/hardforks/src/hardfork.rs:98-123 | reth/crates/optimism/hardforks/src/hardfork.rs:131-156 | reth/crates/optimism/hardforks/src/hardfork.rs:165-190 — 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 `reth/crates/optimism/hardforks/src/hardfork.rs:64` 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, `reth/crates/optimism/hardforks/src/hardfork.rs:90` calls `Some` and `reth/crates/optimism/hardforks/src/hardfork.rs:124` 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 (26 lines × 2) reth/crates/cli/commands/src/import.rs:204— reth/crates/cli/commands/src/import.rs:204-229 | reth/crates/optimism/cli/src/commands/build_pipeline.rs:72-97 — 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 `reth/crates/cli/commands/src/import.rs:204` 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, `reth/crates/optimism/cli/src/commands/build_pipeline.rs:70` calls `optimism`, `chain_spec` and `reth/crates/cli/commands/src/import.rs:202` 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 (24–25 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:244— nomt/nomt/src/beatree/ops/update/branch_stage.rs:244-267 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:393-417 — before extracting anything, compare `nomt/nomt/src/beatree/ops/update/branch_stage.rs` and `nomt/nomt/src/beatree/ops/update/leaf_stage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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 `nomt/nomt/src/beatree/ops/update/branch_stage.rs:244` 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 (23–24 lines × 2) reth/crates/cli/commands/src/import.rs:113— reth/crates/cli/commands/src/import.rs:113-136 | reth/crates/optimism/cli/src/commands/import.rs:104-126 — 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 `reth/crates/cli/commands/src/import.rs:113` 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 (24 lines × 2) reth/crates/optimism/payload/src/builder.rs:291— reth/crates/optimism/payload/src/builder.rs:291-314 | reth/crates/optimism/payload/src/builder.rs:382-405 — 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 `reth/crates/optimism/payload/src/builder.rs:291` 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 (22–23 lines × 2) nomt/nomt/src/lib.rs:790— nomt/nomt/src/lib.rs:790-812 | nomt/nomt/src/lib.rs:848-869 — 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. 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 (20–22 lines × 2) reth/crates/ethereum-forks/src/hardfork/ethereum.rs:73— reth/crates/ethereum-forks/src/hardfork/ethereum.rs:73-92 | reth/crates/ethereum-forks/src/hardfork/ethereum.rs:209-230 — 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 (18–19 lines × 4) reth/crates/prune/prune/src/segments/receipts.rs:46— reth/crates/prune/prune/src/segments/receipts.rs:46-63 | reth/crates/prune/prune/src/segments/static_file/transactions.rs:63-80 | reth/crates/prune/prune/src/segments/user/sender_recovery.rs:63-80 | reth/crates/prune/prune/src/segments/user/transaction_lookup.rs:90-108 — 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 `reth/crates/prune/prune/src/segments/receipts.rs:46` 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 × 3) reth/crates/storage/provider/src/providers/mod.rs:647— reth/crates/storage/provider/src/providers/mod.rs:647-664 | reth/crates/storage/provider/src/test_utils/mock.rs:777-794 | reth/crates/storage/provider/src/test_utils/noop.rs:488-505 — 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 `reth/crates/storage/provider/src/providers/mod.rs:647` 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 (14–18 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:395— nomt/nomt/src/beatree/ops/update/branch_stage.rs:395-408 | nomt/nomt/src/beatree/ops/update/branch_stage.rs:416-433 — 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 `nomt/nomt/src/beatree/ops/update/branch_stage.rs:395` 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 (17–18 lines × 2) reth/crates/ethereum/payload/src/lib.rs:352— reth/crates/ethereum/payload/src/lib.rs:352-368 | reth/crates/optimism/payload/src/builder.rs:449-466 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/optimism/payload/src/builder.rs:449` 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 (16–17 lines × 2) nomt/benchtop/src/nomt.rs:83— nomt/benchtop/src/nomt.rs:83-98 | nomt/benchtop/src/nomt.rs:134-150 — 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 (14–16 lines × 4) reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:149— reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:149-164 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:173-186 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:200-213 | reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:432-447 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:188` calls `unwrap_or_default`, `into_inner` and `reth/crates/rpc/rpc-types-compat/src/engine/payload.rs:164` 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 (13–16 lines × 2) reth/crates/net/discv4/src/proto.rs:493— reth/crates/net/discv4/src/proto.rs:493-505 | reth/crates/net/discv4/src/proto.rs:565-580 — 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 `reth/crates/net/discv4/src/proto.rs:565` 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–16 lines × 2) reth/crates/tasks/src/lib.rs:458— reth/crates/tasks/src/lib.rs:458-472 | reth/crates/tasks/src/lib.rs:506-521 — 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 `reth/crates/tasks/src/lib.rs:458` 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–15 lines × 2) nomt/nomt/src/beatree/ops/update/branch_stage.rs:60— nomt/nomt/src/beatree/ops/update/branch_stage.rs:60-74 | nomt/nomt/src/beatree/ops/update/leaf_stage.rs:120-133 — before extracting anything, compare `nomt/nomt/src/beatree/ops/update/branch_stage.rs` and `nomt/nomt/src/beatree/ops/update/leaf_stage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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 `nomt/nomt/src/beatree/ops/update/branch_stage.rs:60` 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–14 lines × 6) reth/crates/ethereum-forks/src/forkid.rs:150— reth/crates/ethereum-forks/src/forkid.rs:150-163 | reth/crates/net/discv4/src/proto.rs:294-307 | reth/crates/net/discv4/src/proto.rs:336-349 | reth/crates/net/discv4/src/proto.rs:379-392 | reth/crates/net/discv4/src/proto.rs:497-508 | reth/crates/net/discv4/src/proto.rs:572-584 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `reth/crates/ethereum-forks/src/forkid.rs:150` 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 × 3) reth/crates/cli/commands/src/stage/dump/hashing_account.rs:38— reth/crates/cli/commands/src/stage/dump/hashing_account.rs:38-51 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:28-41 | reth/crates/cli/commands/src/stage/dump/merkle.rs:55-68 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/hashing_account.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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 `reth/crates/cli/commands/src/stage/dump/hashing_account.rs:38` 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 × 3) reth/crates/ethereum/payload/src/lib.rs:228— reth/crates/ethereum/payload/src/lib.rs:228-241 | reth/crates/optimism/payload/src/builder.rs:275-287 | reth/crates/optimism/payload/src/builder.rs:356-369 — before extracting anything, compare `reth/crates/ethereum/payload/src/lib.rs` and `reth/crates/optimism/payload/src/builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 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 `reth/crates/ethereum/payload/src/lib.rs:228` 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 × 3) reth/crates/trie/db/src/proof.rs:52— reth/crates/trie/db/src/proof.rs:52-63 | reth/crates/trie/db/src/proof.rs:72-83 | reth/crates/trie/db/src/witness.rs:35-46 — 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.
Duplicated block (11–12 lines × 2) reth/crates/net/downloaders/src/bodies/task.rs:75— reth/crates/net/downloaders/src/bodies/task.rs:75-86 | reth/crates/net/downloaders/src/headers/task.rs:71-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. Read the line range as the matched WINDOW rather than a finished unit: at `reth/crates/net/downloaders/src/bodies/task.rs:75` 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–12 lines × 2) reth/crates/primitives/src/transaction/mod.rs:337— reth/crates/primitives/src/transaction/mod.rs:337-348 | reth/crates/primitives/src/transaction/mod.rs:411-420 — 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 (8–11 lines × 3) reth/crates/cli/commands/src/db/stats.rs:227— reth/crates/cli/commands/src/db/stats.rs:227-234 | reth/crates/cli/commands/src/db/stats.rs:288-298 | reth/crates/cli/commands/src/db/stats.rs:316-323 — 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 `reth/crates/cli/commands/src/db/stats.rs:227` 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–11 lines × 2) nomt/benchtop/src/nomt.rs:114— nomt/benchtop/src/nomt.rs:114-123 | nomt/benchtop/src/nomt.rs:187-197 — 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 `nomt/benchtop/src/nomt.rs:114` 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–10 lines × 2) reth/crates/storage/provider/src/providers/database/provider.rs:2836— reth/crates/storage/provider/src/providers/database/provider.rs:2836-2845 | reth/crates/storage/provider/src/providers/database/provider.rs:2854-2862 — 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 `reth/crates/storage/provider/src/providers/database/provider.rs:2836` 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 × 3) reth/crates/cli/commands/src/db/stats.rs:111— reth/crates/cli/commands/src/db/stats.rs:111-118 | reth/crates/cli/commands/src/db/stats.rs:302-309 | reth/crates/cli/commands/src/db/stats.rs:351-359 — 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–9 lines × 3) reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435— reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435-443 | reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:465-473 | reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:495-501 — 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 `reth/crates/rpc/rpc-eth-types/src/cache/mod.rs:435` 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–9 lines × 2) reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:305— reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:305-313 | reth/crates/rpc/rpc/src/debug.rs:553-559 — 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 `reth/crates/rpc/rpc-eth-api/src/helpers/call.rs:305` 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 (6–7 lines × 3) reth/crates/primitives/src/transaction/compat.rs:38— reth/crates/primitives/src/transaction/compat.rs:38-43 | reth/crates/primitives/src/transaction/compat.rs:52-57 | reth/crates/primitives/src/transaction/compat.rs:80-86 — 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. 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) reth/crates/primitives/src/transaction/compat.rs:37— reth/crates/primitives/src/transaction/compat.rs:37-41 | reth/crates/primitives/src/transaction/compat.rs:51-55 | reth/crates/primitives/src/transaction/compat.rs:65-69 | reth/crates/primitives/src/transaction/compat.rs:79-83 — 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.
Duplicated block (15 lines × 3) reth/crates/rpc/rpc-engine-api/src/engine_api.rs:293— reth/crates/rpc/rpc-engine-api/src/engine_api.rs:293-307 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:328-342 | reth/crates/rpc/rpc-engine-api/src/engine_api.rs:363-377 — 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 `reth/crates/rpc/rpc-engine-api/src/engine_api.rs:293` 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) reth/crates/cli/commands/src/stage/dump/hashing_account.rs:90— reth/crates/cli/commands/src/stage/dump/hashing_account.rs:90-102 | reth/crates/cli/commands/src/stage/dump/hashing_storage.rs:85-97 | reth/crates/cli/commands/src/stage/dump/merkle.rs:160-172 — before extracting anything, compare `reth/crates/cli/commands/src/stage/dump/hashing_account.rs` and `reth/crates/cli/commands/src/stage/dump/hashing_storage.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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 `reth/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· Near-duplicate member family (4 members, 27 shared lines) · ×1
Near-duplicate member family (4 members, 27 shared lines) reth/crates/storage/provider/src/test_utils/blocks.rs:247— reth/crates/storage/provider/src/test_utils/blocks.rs:247-306 | reth/crates/storage/provider/src/test_utils/blocks.rs:313-373 | reth/crates/storage/provider/src/test_utils/blocks.rs:380-466 | reth/crates/storage/provider/src/test_utils/blocks.rs:473-554 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
Near-duplicate member pair (201 shared lines) bench/src/bin/speed.rs:949— bench/src/bin/speed.rs:949-1228 | bench/src/bin/speed.rs:1390-1751 — These two members are variants of one another: 201 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 (23 shared lines) reth/crates/storage/provider/src/test_utils/blocks.rs:189— reth/crates/storage/provider/src/test_utils/blocks.rs:189-240 | reth/crates/storage/provider/src/test_utils/blocks.rs:247-306 — These two members are variants of one another: 23 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 copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) reth/crates/transaction-pool/src/test_utils/mock.rs:220— reth/crates/transaction-pool/src/test_utils/mock.rs:220-233 | reth/crates/transaction-pool/src/test_utils/mock.rs:236-250 | reth/crates/transaction-pool/src/test_utils/mock.rs:253-268 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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 (73 lines × 2) bench/src/bin/speed.rs:1146— bench/src/bin/speed.rs:1146-1218 | bench/src/bin/speed.rs:1609-1681 — 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 `bench/src/bin/speed.rs:1146` 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 (46 lines × 2) bench/src/bin/speed.rs:1008— bench/src/bin/speed.rs:1008-1053 | bench/src/bin/speed.rs:1467-1512 — 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 `bench/src/bin/speed.rs:1008` 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 (18–23 lines × 2) bench/src/bin/speed.rs:964— bench/src/bin/speed.rs:964-986 | bench/src/bin/speed.rs:1426-1443 — 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) bench/src/speed/reth_adapter.rs:188— bench/src/speed/reth_adapter.rs:188-210 | bench/src/speed/reth_adapter.rs:214-236 — 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 `bench/src/speed/reth_adapter.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 (13–17 lines × 3) bench/src/bin/speed.rs:1128— bench/src/bin/speed.rs:1128-1144 | bench/src/bin/speed.rs:1341-1353 | bench/src/bin/speed.rs:1591-1607 — 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 `bench/src/bin/speed.rs:1128` 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 lines × 4) reth/crates/storage/provider/src/test_utils/blocks.rs:273— reth/crates/storage/provider/src/test_utils/blocks.rs:273-287 | reth/crates/storage/provider/src/test_utils/blocks.rs:345-359 | reth/crates/storage/provider/src/test_utils/blocks.rs:438-452 | reth/crates/storage/provider/src/test_utils/blocks.rs:526-540 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:273` 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–14 lines × 3) bench/src/bin/speed.rs:1149— bench/src/bin/speed.rs:1149-1162 | bench/src/bin/speed.rs:1356-1366 | bench/src/bin/speed.rs:1612-1625 — 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 `bench/src/bin/speed.rs:1149` 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 × 5) reth/crates/storage/provider/src/test_utils/blocks.rs:211— reth/crates/storage/provider/src/test_utils/blocks.rs:211-221 | reth/crates/storage/provider/src/test_utils/blocks.rs:273-283 | reth/crates/storage/provider/src/test_utils/blocks.rs:345-355 | reth/crates/storage/provider/src/test_utils/blocks.rs:438-448 | reth/crates/storage/provider/src/test_utils/blocks.rs:526-536 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:211` 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 `number` to `BlockNumber) -> (SealedBlockWithSenders` in one and `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reth/crates/storage/provider/src/test_utils/blocks.rs:285` calls `clone`, `extend` and `reth/crates/storage/provider/src/test_utils/blocks.rs:223` 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 (3–7 lines × 3) bench/src/bin/speed.rs:1109— bench/src/bin/speed.rs:1109-1115 | bench/src/bin/speed.rs:1330-1332 | bench/src/bin/speed.rs:1571-1577 — 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 `bench/src/bin/speed.rs:1109` 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 × 6) bench/src/bin/speed.rs:1135— bench/src/bin/speed.rs:1135-1141 | bench/src/bin/speed.rs:1155-1161 | bench/src/bin/speed.rs:1346-1351 | bench/src/bin/speed.rs:1360-1365 | bench/src/bin/speed.rs:1598-1604 | bench/src/bin/speed.rs:1618-1624 — all 6 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 `bench/src/bin/speed.rs:1135` 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 × 5) reth/crates/storage/provider/src/test_utils/blocks.rs:235— reth/crates/storage/provider/src/test_utils/blocks.rs:235-240 | reth/crates/storage/provider/src/test_utils/blocks.rs:301-306 | reth/crates/storage/provider/src/test_utils/blocks.rs:368-373 | reth/crates/storage/provider/src/test_utils/blocks.rs:461-466 | reth/crates/storage/provider/src/test_utils/blocks.rs:549-554 — 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 `reth/crates/storage/provider/src/test_utils/blocks.rs:235` 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 (3–6 lines × 3) bench/src/bin/speed.rs:1119— bench/src/bin/speed.rs:1119-1124 | bench/src/bin/speed.rs:1336-1338 | bench/src/bin/speed.rs:1582-1587 — 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 `bench/src/bin/speed.rs:1119` 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. 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.
End-of-life runtime: Rust 1.94 rust-toolchain.toml:1— rust-toolchain.toml declares Rust 1.94 as this project's toolchain file, and Rust 1.94, superseded by 1.95 on 2026-04-16 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-04-16 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
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.
X18 · Disposal-pattern correctness· Owned value's release suppressed and never restored · ×1
Owned value's release suppressed and never restored nomt/torture/src/logging.rs:111— `std::mem::forget(_enter)` (line 111) takes `_enter` out of Rust's ownership: its `Drop` never runs, so whatever it holds — a descriptor, a socket, a buffer, a lock — is never given back, and nothing can give it back later because the value is gone. Let it drop (or call its explicit close) where its work ends; if the handle must outlive this function, turn it into a raw handle with `into_raw`/`into_raw_fd` and reclaim it with the matching `from_raw` when the owner is done.
Interpolated log message defeats structured logging reth/crates/transaction-pool/src/maintain.rs:298— `debug!` at line 298 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 reth/crates/transaction-pool/src/maintain.rs:661— `error!` at line 661 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 reth/crates/transaction-pool/src/pool/best.rs:176— `debug!` at line 176 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 reth/crates/transaction-pool/src/pool/mod.rs:479— `debug!` at line 479 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 reth/crates/transaction-pool/src/pool/mod.rs:607— `debug!` at line 607 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 reth/crates/transaction-pool/src/pool/mod.rs:826— `debug!` at line 826 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 reth/crates/transaction-pool/src/pool/mod.rs:828— `warn!` at line 828 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 reth/crates/transaction-pool/src/pool/mod.rs:896— `debug!` at line 896 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 reth/crates/transaction-pool/src/pool/mod.rs:937— `debug!` at line 937 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 reth/crates/transaction-pool/src/pool/txpool.rs:826— `trace!` at line 826 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 reth/crates/transaction-pool/src/pool/txpool.rs:838— `trace!` at line 838 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 reth/crates/transaction-pool/src/blobstore/disk.rs:356— `trace!` at line 356 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 reth/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 reth/crates/tasks/src/lib.rs:405— `error!` at line 405 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 reth/crates/tasks/src/lib.rs:465— `error!` at line 465 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 reth/crates/tasks/src/lib.rs:514— `error!` 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: `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 reth/crates/storage/provider/src/providers/static_file/manager.rs:177— `warn!` at line 177 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 reth/crates/storage/provider/src/providers/static_file/manager.rs:183— `warn!` 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: `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 reth/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 reth/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 reth/crates/storage/db/src/implementation/mdbx/mod.rs:321— `warn!` at line 321 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 reth/crates/stages/stages/src/stages/hashing_account.rs:261— `info!` at line 261 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 reth/crates/stages/stages/src/stages/hashing_storage.rs:196— `info!` at line 196 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 reth/crates/stages/api/src/pipeline/mod.rs:508— `error!` at line 508 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 reth/crates/stages/api/src/pipeline/mod.rs:537— `error!` at line 537 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`.
Duplicated predicate reth/crates/stages/stages/src/stages/hashing_account.rs:179— `!channels.is_empty() && channels.len() % MAXIMUM_CHANNELS == 0` appears character-identically in 2 files — reth/crates/stages/stages/src/stages/hashing_account.rs, reth/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 reth/crates/node/builder/src/launch/engine.rs:242— `ctx.node_config().debug.tip.is_none() && !ctx.is_dev()` appears character-identically in 2 files — reth/crates/node/builder/src/launch/engine.rs, reth/crates/node/builder/src/launch/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 reth/crates/consensus/beacon/src/engine/mod.rs:1128— `error.is_block_hash_mismatch() || error.is_invalid_versioned_hashes()` appears character-identically in 2 files — reth/crates/consensus/beacon/src/engine/mod.rs, reth/crates/engine/tree/src/tree/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 nomt/nomt/src/beatree/ops/update/branch_ops.rs:209— `pos < self.ops.len() && gauge.body_size() < target` appears character-identically in 2 files — nomt/nomt/src/beatree/ops/update/branch_ops.rs, nomt/nomt/src/beatree/ops/update/leaf_updater.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 reth/crates/storage/provider/src/providers/blockchain_provider.rs:1145— `receipts.is_none() && !rpc_block_hash.require_canonical.unwrap_or(false)` appears character-identically in 2 files — reth/crates/storage/provider/src/providers/blockchain_provider.rs, reth/crates/storage/provider/src/providers/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 nomt/nomt/src/beatree/ops/update/branch_stage.rs:223— `remaining_workers > 0 && changeset_remaining.len() > 0` appears character-identically in 2 files — nomt/nomt/src/beatree/ops/update/branch_stage.rs, nomt/nomt/src/beatree/ops/update/leaf_stage.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 reth/crates/consensus/beacon/src/engine/sync.rs:124— `self.pending_pipeline_target.is_some() && self.pipeline_state.is_idle()` appears character-identically in 2 files — reth/crates/consensus/beacon/src/engine/sync.rs, reth/crates/engine/tree/src/backfill.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 reth/crates/stages/stages/src/stages/hashing_account.rs:152— `to_block - from_block > self.clean_threshold || from_block == 1` appears character-identically in 2 files — reth/crates/stages/stages/src/stages/hashing_account.rs, reth/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.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×5
Diagnostic log message is built whether or not it is wanted reth/crates/storage/libmdbx-rs/src/txn_manager.rs:279— `trace!` at line 279 is called with an argument built by `self.active.iter().map(|entry|{let(tx,start)=entry.value();(tx.clone(),start.elapsed())}).collect::<Vec<_>>()` (line 285), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls.
Diagnostic log message is built whether or not it is wanted reth/crates/net/network/src/transactions/mod.rs:745— `trace!` at line 745 is called with an argument built by `valid_announcement_data.iter().count()` (line 747), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls.
Diagnostic log message is built whether or not it is wanted reth/crates/net/discv5/src/lib.rs:548— `trace!` at line 548 is called with an argument built by `format!("{:#?}",pulse_lookup_interval)` (line 551), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls.
Diagnostic log message is built whether or not it is wanted reth/crates/net/discv5/src/lib.rs:566— `trace!` at line 566 is called with an argument built by `format!("{:#?}",lookup_interval)` (line 568), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls.
Diagnostic log message is built whether or not it is wanted reth/crates/net/discv5/src/lib.rs:635— `trace!` at line 635 is called with an argument built by `format!("{:#?}",target)` (line 636), whose cost grows with the collection it walks. Rust evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace! is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `log_enabled!`/`tracing::enabled!` test, no debug flag, no `cfg(debug_assertions)`, and the work is in the argument itself, not deferred into a field the subscriber formats or a closure the formatter calls.
P10 · Library API & versioning· Implementation type on the public API · ×2
Implementation type on the public API reth/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` (reth/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 reth/crates/storage/db/src/implementation/mdbx/mod.rs:48— 3 public types in `reth_db.implementation.mdbx` are marked as implementation by their own namespace, folder or name: `DatabaseEnvKind` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:48, `implementation`), `DatabaseArguments` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:64, `implementation`), `DatabaseEnv` (reth/crates/storage/db/src/implementation/mdbx/mod.rs:134, `implementation`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion nomt/nomt/Cargo.toml:1— `nomt/nomt` (23278 LoC, 185 module-visible types across 16 directories) overshoots its size bounds. 1 of 125 build unit(s) (Cargo) overshoot their size bounds, lowering Project Cohesion to 9.8/10. 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.
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 71/74 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `nomt/benchtop`, `reth`, `reth/crates/optimism/bin`.
P3 · Security & performance tooling· Dependabot does not watch cargo/gitsubmodule · ×1
Dependabot does not watch cargo/gitsubmodule REDACTED:2— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, `gitsubmodule`, 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.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety reth/.github/workflows/hive.yml:38— Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
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.)
Outdated: anyhow — `anyhow` is locked at 1.0.100 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1.0.96"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
Outdated: arc-swap — `arc-swap` is locked at 1.8.0 but 1.9.5 is the current stable release on crates.io, and it already satisfies the `"1.7.1"` requirement declared in crates/hpfile/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
Outdated: arrayvec — `arrayvec` is locked at 0.7.6 but 0.7.8 is the current stable release on crates.io, and it already satisfies the `"0.7"` requirement declared in nomt/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arrayvec` 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.3.0"` requirement declared in crates/qmdb/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: bitflags — `bitflags` is locked at 2.10.0 but 2.13.2 is the current stable release on crates.io, and it already satisfies the `"2.4"` requirement declared in reth/crates/transaction-pool/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bitflags` and commit the updated REDACTED.
Outdated: bitvec — `bitvec` is locked at 1.0.1 but 1.1.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in nomt/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bitvec` and commit the updated REDACTED.
Outdated: blake3 — `blake3` is locked at 1.8.3 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1.8.2"` requirement declared in crates/qmdb-common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
Outdated: borsh — `borsh` is locked at 1.6.0 but 1.8.1 is the current stable release on crates.io, and it already satisfies the `"1.5"` requirement declared in crates/qmdb-common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p borsh` and commit the updated REDACTED.
Outdated: bytemuck — `bytemuck` is locked at 1.24.0 but 1.25.2 is the current stable release on crates.io, and it already satisfies the `"1.23.1"` requirement declared in crates/qmdb-common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytemuck` and commit the updated REDACTED.
Outdated: bytes — `bytes` is locked at 1.11.0 but 1.12.1 is the current stable release on crates.io, and it already satisfies the `"1.10.1"` requirement declared in crates/qmdb/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytes` and commit the updated REDACTED.
Outdated: cc — `cc` is locked at 1.2.51 but 1.11.2 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in reth/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: cfg-if — `cfg-if` is locked at 1.0.4 but 1.0.5 is the current stable release on crates.io, and it already satisfies the `"1.0.0"` requirement declared in crates/qmdb/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cfg-if` and commit the updated REDACTED.
Outdated: chrono — `chrono` is locked at 0.4.42 but 0.4.45 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p chrono` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.5.54 but 4.6.8 is the current stable release on crates.io, and it already satisfies the `"4.5"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: crossbeam — `crossbeam` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam` and commit the updated REDACTED.
Outdated: crossbeam-channel — `crossbeam-channel` is locked at 0.5.15 but 0.5.17 is the current stable release on crates.io, and it already satisfies the `"0.5.13"` requirement declared in nomt/nomt/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam-channel` and commit the updated REDACTED.
Outdated: dashmap — `dashmap` is locked at 6.1.0 but 6.2.1 is the current stable release on crates.io, and it already satisfies the `"6.1.0"` requirement declared in crates/hpfile/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p dashmap` and commit the updated REDACTED.
Outdated: futures — `futures` is locked at 0.3.31 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
Outdated: futures-core — `futures-core` is locked at 0.3.31 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in reth/crates/payload/basic/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-core` and commit the updated REDACTED.
Outdated: futures-util — `futures-util` is locked at 0.3.31 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.31"` requirement declared in nomt/torture/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
Outdated: indexmap — `indexmap` is locked at 2.13.0 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in reth/crates/storage/libmdbx-rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
Outdated: io-uring — `io-uring` is locked at 0.7.11 but 0.7.16 is the current stable release on crates.io, and it already satisfies the `"0.7.2"` requirement declared in crates/qmdb/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p io-uring` and commit the updated REDACTED.
Outdated: lazy_static — `lazy_static` is locked at 1.5.0 but 1.5.1 is the current stable release on crates.io, and it already satisfies the `"1.4.0"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p lazy_static` and commit the updated REDACTED.
Outdated: libc — `libc` is locked at 0.2.180 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: log — `log` is locked at 0.4.29 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
Off the main sequence: qmdb-common — qmdb-common: abstractness 0.14, instability 0.00, 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.
Off the main sequence: reth-primitives-traits — reth-primitives-traits: abstractness 0.08, instability 0.08, distance 0.84 — 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.00, instability 0.18, distance 0.82 — 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-primitives — reth-primitives: abstractness 0.11, instability 0.08, distance 0.81 — 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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1e884-2b06-71a5-8e5f-01abf88b286e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 30 · Warnings: 1277 · Recommendations: 66 · Info: 52 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 07:58 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.