Public report of matter-labs/zksync-os, 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 report Measured 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:03 UTC · Survey ID cd_e81911d4d6074601b4647f2936e9c0e8

matter-labs/zksync-os

Measured 17 November 2026, 08:02 UTC, at code version f91897c

First survey, so nothing to compare with yet
CAI score 62.1out of 100 Adequate
CriticalWeakAdequateStrongExemplary

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: 132,313 lines of product code in 25 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Production Readiness, 57.1

Findings by how serious they are

65 critical 626 serious 218 minor

12 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 08:02 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

54of 54 dimensions measured by tools.
893of 909 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
54dimensions across 5 lenses, read from 132,313 lines of product code in 25 projects.
Chapters

Executive summary

matter-labs/zksync-os falls short of our standard for a preview release, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 62.1 out of 100 and is rated Adequate, and 62 of its 65 critical findings are security problems.

Production Readiness, at 57.1, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 3.3 points. Documenting the recovery plan would lift Production Readiness itself, worth about 2.4 points. Raising Production Readiness to 62 would lift the score to about 63.7.

Thirty-eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Seventeen pipeline steps install packages that can change without warning. Pinning each tool to an exact version and pinning what the pipeline installs would close both risks. Passing outside input through environment variables would fix the three pipeline steps that put outside input straight into a shell command, and the two unsafe settings in infrastructure or container files need changing to safe values. The three sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 132,313 lines, about €190,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The 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.
Production Readiness 57.1 · counts for 47%Security and Compliance 58.8 · counts for 26%Maturity 65.7 · counts for 14%Code Health 77.8 · counts for 8%Architecture 95.2 · counts for 4%

If Production Readiness rose from 57.1 to 62, the lowest score rated Strong, the score would rise from 62.1 to about 63.7.

Code composition: what the lines of code are
Product code 78%Tests 22%
Rebuild cost: about €190,000 · Estimate
Cost to rebuild€62,000 to €310,000, for 1,042 to 3,305 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, 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.9 at a score of 62. 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.
SizeLarge: 132,313 lines of product code
What it is notNot 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 1 No ADRs found finding(s) in ADR Quality — start with main.rs.
Raises the score by about 3.3 points · Low effort · ADR Quality
2
Resolve the 1 `LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx` finding(s) in Naming Consistency — start with legacy_tx.rs.
Raises the score by about 2.0 points · Low effort · Naming Consistency
3
Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2).
Raises the score by about 1.6 points · Low effort · Documentation Quality

Diagnosis: what the measurements show together

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 €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Production Readiness, at 57.1 (Adequate). 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 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 3.3 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 54,456 lines over the last 90 days, which is about 220,849 lines a year. At that pace, the extra work comes to an estimated 11 to 73.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

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.

arch basic_bootloader basic_bootloader basic_system basic_system basic_bootloader->basic_system crypto crypto basic_bootloader->crypto cycle_marker cycle_marker basic_bootloader->cycle_marker evm_interpreter evm_interpreter basic_bootloader->evm_interpreter system_hooks system_hooks basic_bootloader->system_hooks zk_ee zk_ee basic_bootloader->zk_ee cc-traits cc-traits basic_system->cc-traits basic_system->crypto basic_system->cycle_marker basic_system->evm_interpreter modexp modexp basic_system->modexp storage_models storage_models basic_system->storage_models basic_system->zk_ee callable_oracles callable_oracles callable_oracles->basic_bootloader callable_oracles->basic_system callable_oracles->crypto oracle_provider oracle_provider callable_oracles->oracle_provider callable_oracles->zk_ee const_keccak256 const_keccak256 delegated_u256 delegated_u256 evm_interpreter->crypto evm_interpreter->cycle_marker evm_interpreter->zk_ee forward_system forward_system forward_system->basic_bootloader forward_system->basic_system forward_system->callable_oracles forward_system->crypto forward_system->evm_interpreter forward_system->oracle_provider forward_system->system_hooks forward_system->zk_ee zksync_os_runner zksync_os_runner forward_system->zksync_os_runner oracle_provider->zk_ee proof_running_system proof_running_system proof_running_system->basic_bootloader proof_running_system->basic_system proof_running_system->crypto proof_running_system->evm_interpreter proof_running_system->system_hooks proof_running_system->zk_ee solidity_abi solidity_abi solidity_abi->const_keccak256 storage_models->zk_ee system_hooks->cycle_marker system_hooks->evm_interpreter system_hooks->zk_ee zk_ee->crypto zk_ee->cycle_marker zksync_os zksync_os zksync_os->crypto zksync_os->proof_running_system zksync_os_api zksync_os_api zksync_os_api->basic_bootloader zksync_os_api->basic_system zksync_os_api->crypto zksync_os_api->evm_interpreter zksync_os_api->forward_system zksync_os_api->oracle_provider zksync_os_api->zk_ee zksync_os_api->zksync_os_runner zksync_os_runner->cycle_marker __more__ +4 more projects

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.

382 modules, with 684 dependencies between them. 7 loops run through 17 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 342 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 →1 basic_bootloader.bootloader.transaction.rlp_encoded.rlp.minimal_rlp_parser2 crypto.ark_ff_delegation.biginteger3 crypto.secp256k1.field4 oracle_provider5 storage_models.common_structs.traits.snapshottable_io6 zk_ee.common_structs.history_map7 zk_ee.oracle.usize_serialization8 zk_ee.system.errors.interface9 zk_ee.system.errors.root_cause10 zk_ee.system.resources11 zk_ee.utils.aligned_vector12 crypto.secp256k1.points.jacobian13 zk_ee.execution_environment_type14 zk_ee.system.base_system_functions15 zk_ee.system.errors.cascade16 zk_ee.system.execution_environment.environment_state17 zk_ee.utils.bytes3218 basic_bootloader.bootloader.errors19 basic_system.system_implementation.ethereum_storage_model.caches.full_storage_cache20 basic_system.system_implementation.flat_storage_model.preimage_cache21 crypto.secp256k1.points.affine22 zk_ee.common_structs.warm_storage_key23 zk_ee.system24 basic_bootloader.bootloader.transaction25 basic_system.system_implementation.ethereum_storage_model.caches.preimage26 zk_ee.common_structs.system_hooks27 zk_ee.system.io28 basic_bootloader.bootloader.runner29 basic_bootloader.bootloader.supported_ees30 basic_system.system_implementation.ethereum_storage_model.caches.account_cache31 basic_system.system_implementation.flat_storage_model.account_cache32 basic_system.system_implementation.system.io_subsystem33 evm_interpreter34 basic_bootloader.bootloader.block_flow.ethereum35 basic_bootloader.bootloader.transaction_flow36 basic_system.system_implementation.ethereum_storage_model.persist_changes37 basic_system.system_implementation.ethereum_storage_model.storage_model38 basic_system.system_implementation.flat_storage_model39 basic_bootloader.bootloader.transaction_flow.ethereum40 basic_bootloader.bootloader.transaction_flow.zk
1 basic_bootloader.bootloader.transaction.rlp_encoded.rlp.minimal_rlp_parser
2 crypto.ark_ff_delegation.biginteger
3 crypto.secp256k1.field
4 oracle_provider
5 storage_models.common_structs.traits.snapshottable_io
6 zk_ee.common_structs.history_map
7 zk_ee.oracle.usize_serialization
8 zk_ee.system.errors.interface
9 zk_ee.system.errors.root_cause
10 zk_ee.system.resources
11 zk_ee.utils.aligned_vector
12 crypto.secp256k1.points.jacobian22
13 zk_ee.execution_environment_type2
14 zk_ee.system.base_system_functions6
15 zk_ee.system.errors.cascade1
16 zk_ee.system.execution_environment.environment_state3
17 zk_ee.utils.bytes322
18 basic_bootloader.bootloader.errors121
19 basic_system.system_implementation.ethereum_storage_model.caches.full_storage_cache111
20 basic_system.system_implementation.flat_storage_model.preimage_cache11112
21 crypto.secp256k1.points.affine22
22 zk_ee.common_structs.warm_storage_key3
23 zk_ee.system11111
24 basic_bootloader.bootloader.transaction2111
25 basic_system.system_implementation.ethereum_storage_model.caches.preimage111121
26 zk_ee.common_structs.system_hooks111
27 zk_ee.system.io3222111
28 basic_bootloader.bootloader.runner12332
29 basic_bootloader.bootloader.supported_ees11211
30 basic_system.system_implementation.ethereum_storage_model.caches.account_cache21211111
31 basic_system.system_implementation.flat_storage_model.account_cache21211111
32 basic_system.system_implementation.system.io_subsystem111115
33 evm_interpreter3221
34 basic_bootloader.bootloader.block_flow.ethereum421
35 basic_bootloader.bootloader.transaction_flow11111
36 basic_system.system_implementation.ethereum_storage_model.persist_changes111
37 basic_system.system_implementation.ethereum_storage_model.storage_model1211111111
38 basic_system.system_implementation.flat_storage_model111121111
39 basic_bootloader.bootloader.transaction_flow.ethereum11111114
40 basic_bootloader.bootloader.transaction_flow.zk31211114
Uses a module listed above itPart of a loopThe module itself
1 basic_bootloader.bootloader.transaction.rlp_encoded.rlp.minimal_rlp_parser2 crypto.ark_ff_delegation.biginteger3 crypto.secp256k1.field4 oracle_provider5 storage_models.common_structs.traits.snapshottable_io6 zk_ee.common_structs.history_map7 zk_ee.oracle.usize_serialization8 zk_ee.system.errors.interface9 zk_ee.system.errors.root_cause10 zk_ee.system.resources11 zk_ee.utils.aligned_vector12 crypto.secp256k1.points.jacobian13 zk_ee.execution_environment_type14 zk_ee.system.base_system_functions15 zk_ee.system.errors.cascade16 zk_ee.system.execution_environment.environment_state17 zk_ee.utils.bytes3218 basic_bootloader.bootloader.errors19 basic_system.system_implementation.ethereum_storage_model.caches.full_storage_cache20 basic_system.system_implementation.flat_storage_model.preimage_cache21 crypto.secp256k1.points.affine22 zk_ee.common_structs.warm_storage_key23 zk_ee.system24 basic_bootloader.bootloader.transaction25 basic_system.system_implementation.ethereum_storage_model.caches.preimage26 zk_ee.common_structs.system_hooks27 zk_ee.system.io28 basic_bootloader.bootloader.runner29 basic_bootloader.bootloader.supported_ees30 basic_system.system_implementation.ethereum_storage_model.caches.account_cache31 basic_system.system_implementation.flat_storage_model.account_cache32 basic_system.system_implementation.system.io_subsystem33 evm_interpreter34 basic_bootloader.bootloader.block_flow.ethereum35 basic_bootloader.bootloader.transaction_flow36 basic_system.system_implementation.ethereum_storage_model.persist_changes37 basic_system.system_implementation.ethereum_storage_model.storage_model38 basic_system.system_implementation.flat_storage_model39 basic_bootloader.bootloader.transaction_flow.ethereum40 basic_bootloader.bootloader.transaction_flow.zkbasic_bootloader.bootloader.transaction.rlp_encoded.rlp.minimal_rlp_parser1crypto.ark_ff_delegation.biginteger2crypto.secp256k1.field3oracle_provider4storage_models.common_structs.traits.snapshottable_io5zk_ee.common_structs.history_map6zk_ee.oracle.usize_serialization7zk_ee.system.errors.interface8zk_ee.system.errors.root_cause9zk_ee.system.resources10zk_ee.utils.aligned_vector11crypto.secp256k1.points.jacobian12zk_ee.execution_environment_type13zk_ee.system.base_system_functions14zk_ee.system.errors.cascade15zk_ee.system.execution_environment.environment_state16zk_ee.utils.bytes3217basic_bootloader.bootloader.errors18basic_system.system_implementation.ethereum_storage_model.caches.full_storage_cache19basic_system.system_implementation.flat_storage_model.preimage_cache20crypto.secp256k1.points.affine21zk_ee.common_structs.warm_storage_key22zk_ee.system23basic_bootloader.bootloader.transaction24basic_system.system_implementation.ethereum_storage_model.caches.preimage25zk_ee.common_structs.system_hooks26zk_ee.system.io27basic_bootloader.bootloader.runner28basic_bootloader.bootloader.supported_ees29basic_system.system_implementation.ethereum_storage_model.caches.account_cache30basic_system.system_implementation.flat_storage_model.account_cache31basic_system.system_implementation.system.io_subsystem32evm_interpreter33basic_bootloader.bootloader.block_flow.ethereum34basic_bootloader.bootloader.transaction_flow35basic_system.system_implementation.ethereum_storage_model.persist_changes36basic_system.system_implementation.ethereum_storage_model.storage_model37basic_system.system_implementation.flat_storage_model38basic_bootloader.bootloader.transaction_flow.ethereum39basic_bootloader.bootloader.transaction_flow.zk4022261321211111111222311111211111112111132221111233211211212111112121111111111532214211111111112111111111111211111111111431211114+342 more modules (most-connected shown)

At a glance — Code Health · 77.8 · Strong ·

At a glance — Architecture · 95.2 · Exemplary ·

At a glance — Maturity · 65.7 · Adequate · gated by M2 ·

At a glance — Readiness · 57.1 · Adequate ·

At a glance — Security · 58.8 · Adequate · gated by D29, D36 ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection64High / Critical
A03:2025 — Software Supply Chain Failures12Medium
A02:2025 — Security Misconfiguration3High / Critical

Roadmap

Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs; 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; Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs.+3.3 ptsLowADR Quality
Resolve the 1 `LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx` finding(s) in Naming Consistency — start with legacy_tx.rs.+2.0 ptsLowNaming Consistency
Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2).+1.6 ptsLowDocumentation Quality
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.+2.6 ptsMediumArchitecture documentation
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+2.4 ptsMediumDR & Backup
Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (3), REDACTED (2).+2.1 ptsMediumStatic Analysis (SAST)
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.7 ptsMediumObservability
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+1.7 ptsMediumDeployment & Rollback

File quality

Per-file score 0–10 — a quality signature. Of 176 files carrying findings, judged against the Preview bar: 2% slop · 20% mixed · 78% near-clean.

FileScoreBandWorst signal
REDACTED0.7SlopStatic Analysis (SAST): High: REDACTED
basic_system/src/system_implementation/flat_storage_model/mod.rs1.0SlopChange Coupling: Boundary-crossing change coupling: mod.rs ↔ lib.rs
basic_system/src/system_implementation/system/io_subsystem.rs2.2SlopChange Coupling: Boundary-crossing change coupling: io_subsystem.rs ↔ lib.rs
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7MixedIaC & Container Security: High IaC: REDACTED
evm_interpreter/src/lib.rs4.7MixedChange Coupling: Boundary-crossing change coupling: lib.rs ↔ storage_model.rs
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedDependency Vulnerabilities: Medium vulnerability: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
supporting_crates/nostd_compression/src/deflate/core.rs6.0MixedExplicit Debt: TodoComment
basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs6.0MixedExplicit Debt: TodoComment
basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs6.0MixedExplicit Debt: TodoComment
basic_bootloader/src/bootloader/transaction_flow/zk/process_l1_transaction.rs6.0MixedExplicit Debt: TodoComment
crypto/src/secp256k1/recover.rs6.0MixedExplicit Debt: TodoComment
basic_bootloader/src/bootloader/block_flow/zk/tx_loop.rs6.0MixedExplicit Debt: TodoComment
basic_system/src/system_implementation/flat_storage_model/account_cache_entry.rs6.0MixedExplicit Debt: TodoComment
basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs6.0MixedExplicit Debt: TodoComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 65

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 — 626

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 — 218

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 12

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 54 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 54 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D20D21D26D28D29D30D31D34D35D36D37D43AX10AX3AX4AX8AX9GD1IC1M1M2M3M4P1P10P2P3P4P5P6X12X16X17X18X21X22X25X27X28X29X30X5

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
  1. 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, 893 of 909 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e887-9cb4-7b31-b708-3743268b74a1.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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, 130 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.
  • D12 Dependency Hygiene — 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. Not scored — 73 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed REDACTED resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — 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. 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.
  • D21 Naming Consistency — 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. 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. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'oracle' is imported (zk_ee/src/utils/bytes32.rs:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'oracle' is imported (zk_ee/src/utils/bytes32.rs:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'oracle' is imported (zk_ee/src/utils/bytes32.rs:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'oracle' is imported (zk_ee/src/utils/bytes32.rs:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • 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.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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. 365 further occurrence(s) are not listed individually; the score already reflects all 405.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

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.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.

Dimensions

D1 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Prevented

19 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Interpreter::run at 155. A further 1 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 InvalidTransaction::into_interface at 44 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: forward_system/src/run/convert.rs (InvalidTransaction::into_interface at 44). 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.

basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction (cyclomatic 37) · ×3basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:46
miniz_nostd_compression::deflate::core::compress_normal (cyclomatic 34) · ×3supporting_crates/nostd_compression/src/deflate/core.rs:1763
EthereumMPT::descend_through_proof (cyclomatic 23) · ×3basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:623
solidity_abi_derive::solidity_codable_derive::derive (cyclomatic 23) · ×2supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:11
MPNat::modpow (cyclomatic 16) · ×2supporting_crates/modexp/src/mpnat.rs:179

+ 6 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with Interpreter::run (cyclomatic 155). — Refactoring it lifts Cyclomatic Complexity from 6.0 to about 7.0/10.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.8 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.8 / 10 · rule-coverage 100% · ceiling Prevented

52 method(s) exceeded the cognitive complexity threshold of 15; the worst was FlatStorageCommitment::verify_and_apply_batch at 125.

miniz_nostd_compression::deflate::core::compress_fast (cognitive 79) · ×6supporting_crates/nostd_compression/src/deflate/core.rs:1960
basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction (cognitive 59) · ×4basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:46
EthereumMPT::descend_through_proof (cognitive 52) · ×4basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:623
crypto::secp256k1::recover::ecmult (cognitive 26) · ×3crypto/src/secp256k1/recover.rs:77
HuffmanOxide::calculate_minimum_redundancy (cognitive 25) · ×3supporting_crates/nostd_compression/src/deflate/core.rs:878

+ 28 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with FlatStorageCommitment::verify_and_apply_batch (cognitive 125), EthereumStoragePersister::persist_changes (cognitive 92), miniz_nostd_compression::deflate::core::compress_fast (cognitive 79). — 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 5 together lifts Cognitive Complexity from 5.8 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.

D3 · God Classes8.9 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Prevented

46 god class(es) detected.

FileTooLong: deflate/core.rs · ×13supporting_crates/nostd_compression/src/deflate/core.rs
MethodTooLong: EthereumStoragePersister.persist_changes · ×11basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:302
ClassTooLong: NewModelAccountCache · ×11basic_system/src/system_implementation/flat_storage_model/account_cache.rs:78
FunctionTooLong: basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction · ×8basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:101
TooManyMethods: Interpreter · ×3evm_interpreter/src/lib.rs:82

What to do

  1. Resolve the 13 FileTooLong finding(s) in God Classes — start with mod.rs (3), account_cache.rs (2), core.rs. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 11 MethodTooLong finding(s) in God Classes — start with trie.rs (2), persist_changes.rs, interpreter.rs. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 11 ClassTooLong finding(s) in God Classes — start with mod.rs (4), account_cache.rs (2), io_subsystem.rs. — One of this dimension's main actionable groups (11 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication7.8 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Verified

147 duplicated block group(s) detected. 5.6 % of the production lines (7,431 of 132,313) are in a reported copy. A further 126 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×13basic_bootloader/src/bootloader/block_flow/ethereum/eip_6110_deposit_events_parser/mod.rs:98
Edited copy of a member (9 corresponding lines) · ×9crypto/src/bigint_delegation/u256.rs:78
Duplicated block (8 lines × 2) · ×9basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:640
Edited copy of a member (10 corresponding lines) · ×8crypto/src/secp256r1/field/fe64.rs:171
Duplicated block (13 lines × 2) · ×8basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:307

+ 126 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 13 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), scalar32.rs (2), msm.rs. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 9 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with codable_array.rs (2), u256.rs, eip2537.rs. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with account_cache.rs (2), delegation.rs, arithmetic.rs. — One of this dimension's main actionable groups (9 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling7.8 / 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.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Prevented

24 production modules (Cargo), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 20 of the 24 (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: const_keccak256 · ×4
Unstable project callable_oracles
Unstable project forward_system

What to do

  1. Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 1 Unstable project callable_oracles finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project forward_system 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.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 4 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

4 of 202 classes have LCOM4 above 3.

Low cohesion: Fp (LCOM4 25) · ×4crypto/src/ark_ff_delegation/fp/mod.rs:109

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs (2), lib.rs, u256.rs. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 548 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no REDACTED, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 1 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is basic_bootloader/src/bootloader/transaction/rlp_encoded/rlp/minimal_rlp_parser.rs. Counted over 304 of the 497 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.8 / 10Stronggated by 110 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

110 deducted task-comment markers across 132313 LoC (0.1/KLoC) → score 9.8. 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.

TodoComment · ×108zksync_os_runner/src/lib.rs:89
FixmeCommenttests/instances/transactions/src/lib.rs:32
HackCommentsupporting_crates/solidity_abi/src/impls/mod.rs:62

What to do

  1. Resolve the 108 TodoComment finding(s) in Explicit Debt — start with mod.rs (24), lib.rs (12), chain.rs (5). — One of this dimension's main actionable groups (108 warning-level).
  2. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with lib.rs. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 HackComment finding(s) in Explicit Debt — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality6.7 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

1 of 2 documentation facets pass in full; short on: F2 example. 39 document(s) read across 27 unit(s).

Documentation: no build, run or usage example · ×2zksync_os/README.md:1

What to do

  1. Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundzksync_os/src/main.rs:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency5.5 / 10Adequate✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Verified

1 naming inconsistencies among 22 declarations measured against a convention their peers follow.

`LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx`basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/legacy_tx.rs:17

What to do

  1. Resolve the 1 `LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx` finding(s) in Naming Consistency — start with legacy_tx.rs. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion6.8 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.8 / 10 · rule-coverage 100% · ceiling Documented

4 of 25 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×4basic_bootloader/Cargo.toml:1

What to do

  1. Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with Cargo.toml (4). — One of this dimension's main actionable groups (4 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.2 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.2 / 10 · rule-coverage 100% · ceiling Documented

64 finding(s): 0 critical, 60 high, 4 medium, 0 low. 38 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. Separately, one or more rules could not re-parse an embedded snippet in 3 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

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (17 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. No action in Static Analysis (SAST) — all 38 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 (38 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities9.3 / 10Stronggated by 4 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

7 finding(s): 0 critical, 0 high, 4 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.2 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 2 high, 1 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness4.3 / 10Weak✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 4.3 / 10 · rule-coverage 100% · ceiling Documented

172 of 304 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is basic_bootloader/src/bootloader/block_flow/zk/post_tx_op/da_commitment_generator/blob_commitment_generator/brp_roots_of_unity.rs. Counted over 304 of the 497 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×169basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1
Most significant orphaned file · ×3basic_bootloader/src/bootloader/block_flow/zk/post_tx_op/da_commitment_generator/blob_commitment_generator/brp_roots_of_unity.rs:1
Concentrated knowledge decay

What to do

  1. Resolve the 169 Orphaned file finding(s) in Knowledge Freshness — start with mod.rs (25), lib.rs (6), tests.rs (4). — One of this dimension's main actionable groups (169 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with brp_roots_of_unity.rs, consts.rs, core.rs. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.9 / 10Adequategated by 3 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: mod.rs↔io_subsystem.rs 75%; io_subsystem.rs↔lib.rs 60%; lib.rs↔storage_model.rs 50%

Boundary-crossing change coupling: io_subsystem.rs ↔ lib.rs · ×3basic_system/src/system_implementation/system/io_subsystem.rs:1
Change coupling: mod.rs ↔ io_subsystem.rsbasic_system/src/system_implementation/flat_storage_model/mod.rs:1

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with io_subsystem.rs, lib.rs, mod.rs. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

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.

  • `transaction_hash` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:62
  • `set_bytecode_details` is a shipped function whose whole body is still `todo!()`/`unimplemented!()` — generated scaffolding that was never completed. Implement it or remove the dead surface. — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:245
  • `execute`'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. (×4) — zk_ee/src/system/base_system_functions.rs:123, zk_ee/src/system/base_system_functions.rs:134, zk_ee/src/system/base_system_functions.rs:145, …

What to do

  • Finish or delete the functions that are still `todo!()`/`unimplemented!()` or panic "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs6.8 / 10Strong✓ Tool-verified

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.

  • `transaction_hash` 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. — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:62
  • `calculate_pubdata_used_by_tx` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:282, basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:208
  • `find_insertion_strategy` 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) — basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:201, basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:207
  • `set_bytecode_details` 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. — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:245
  • `process_buffered_query` 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. — callable_oracles/src/hash_to_prime/evaluate.rs:49
  • `read_struct` 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. — callable_oracles/src/utils/evaluate.rs:110
  • `bigint_op_delegation_with_carry_bit` 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. — crypto/src/bigint_delegation/delegation.rs:184
  • `parse` 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. — supporting_crates/solidity_abi/src/impls/codable_array.rs:123
  • `parse_mut` 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. — supporting_crates/solidity_abi/src/impls/codable_array.rs:167
  • `add_assign` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — supporting_crates/u256/src/risc_v/mod.rs:397
  • `sub_assign` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — supporting_crates/u256/src/risc_v/mod.rs:404
  • `execute`'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. (×4) — zk_ee/src/system/base_system_functions.rs:123, zk_ee/src/system/base_system_functions.rs:134, zk_ee/src/system/base_system_functions.rs:145, …

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.
M1 · Documentation (README)8.2 / 10Exemplary✓ Tool-verified

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.

M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning9.5 / 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 `basic_system.system_functions.bn254_ecadd` is marked as implementation by its own namespace, folder or name: `Bn254AddImpl` (basic_system/src/system_functions/bn254_ecadd.rs:17, 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. — basic_system/src/system_functions/bn254_ecadd.rs:17
  • 1 public type in `basic_system.system_functions.bn254_ecmul` is marked as implementation by its own namespace, folder or name: `Bn254MulImpl` (basic_system/src/system_functions/bn254_ecmul.rs:18, 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. — basic_system/src/system_functions/bn254_ecmul.rs:18
  • 1 public type in `basic_system.system_functions.bn254_pairing_check` is marked as implementation by its own namespace, folder or name: `Bn254PairingCheckImpl` (basic_system/src/system_functions/bn254_pairing_check.rs:21, 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. — basic_system/src/system_functions/bn254_pairing_check.rs:21
  • 1 public type in `basic_system.system_functions.ecrecover` is marked as implementation by its own namespace, folder or name: `EcRecoverImpl` (basic_system/src/system_functions/ecrecover.rs:12, 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. — basic_system/src/system_functions/ecrecover.rs:12
  • 1 public type in `basic_system.system_functions.keccak256` is marked as implementation by its own namespace, folder or name: `Keccak256Impl` (basic_system/src/system_functions/keccak256.rs:15, 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. — basic_system/src/system_functions/keccak256.rs:15
  • 1 public type in `basic_system.system_functions.modexp` is marked as implementation by its own namespace, folder or name: `ModExpImpl` (basic_system/src/system_functions/modexp/mod.rs:48, 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. — basic_system/src/system_functions/modexp/mod.rs:48
  • 1 public type in `basic_system.system_functions.p256_verify` is marked as implementation by its own namespace, folder or name: `P256VerifyImpl` (basic_system/src/system_functions/p256_verify.rs:16, 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. — basic_system/src/system_functions/p256_verify.rs:16
  • 1 public type in `basic_system.system_functions.point_evaluation` is marked as implementation by its own namespace, folder or name: `PointEvaluationImpl` (basic_system/src/system_functions/point_evaluation.rs:12, 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. — basic_system/src/system_functions/point_evaluation.rs:12
  • 1 public type in `basic_system.system_functions.ripemd160` is marked as implementation by its own namespace, folder or name: `RipeMd160Impl` (basic_system/src/system_functions/ripemd160.rs:16, 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. — basic_system/src/system_functions/ripemd160.rs:16
  • 1 public type in `basic_system.system_functions.sha256` is marked as implementation by its own namespace, folder or name: `Sha256Impl` (basic_system/src/system_functions/sha256.rs:14, 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. — basic_system/src/system_functions/sha256.rs:14
  • 1 public type in `proof_running_system.io_oracle` is marked as implementation by its own namespace, folder or name: `DummyCSRImpl` (proof_running_system/src/io_oracle/mod.rs:41, 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. — proof_running_system/src/io_oracle/mod.rs:41
  • 4 public types in `solidity_abi.impls.byte_ref` are marked as implementation by their own namespace, folder or name: `Bytes` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:7, `impls`), `BytesOwned` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:14, `impls`), `BytesRef` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:47, `impls`), `BytesRefMut` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:51, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — supporting_crates/solidity_abi/src/impls/byte_ref.rs:7
  • 3 public types in `solidity_abi.impls.codable_array` are marked as implementation by their own namespace, folder or name: `Array` (supporting_crates/solidity_abi/src/impls/codable_array.rs:6, `impls`), `ArrayRef` (supporting_crates/solidity_abi/src/impls/codable_array.rs:82, `impls`), `ArrayRefMut` (supporting_crates/solidity_abi/src/impls/codable_array.rs:87, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — supporting_crates/solidity_abi/src/impls/codable_array.rs:6
  • 3 public types in `solidity_abi.impls.codable_slice` are marked as implementation by their own namespace, folder or name: `Slice` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:7, `impls`), `SliceRef` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:90, `impls`), `SliceRefMut` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:96, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — supporting_crates/solidity_abi/src/impls/codable_slice.rs:7
  • 3 public types in `solidity_abi.impls.string_ref` are marked as implementation by their own namespace, folder or name: `SolidityString` (supporting_crates/solidity_abi/src/impls/string_ref.rs:6, `impls`), `SolidityStringRef` (supporting_crates/solidity_abi/src/impls/string_ref.rs:26, `impls`), `SolidityStringRefMut` (supporting_crates/solidity_abi/src/impls/string_ref.rs:30, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — supporting_crates/solidity_abi/src/impls/string_ref.rs:6
  • 9 public types in `solidity_abi.impls.uint_x` are marked as implementation by their own namespace, folder or name: `U256Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:114, `impls`), `U256RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:114, `impls`), `U160Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:115, `impls`), `U160RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:115, `impls`), `U128Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:116, `impls`), `U128RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:116, `impls`), `Address` (supporting_crates/solidity_abi/src/impls/uint_x.rs:119, `impls`), `AddressRef` (supporting_crates/solidity_abi/src/impls/uint_x.rs:131, `impls`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — supporting_crates/solidity_abi/src/impls/uint_x.rs:114
  • 1 public type in `zk_ee.system.errors.internal` is marked as implementation by its own namespace, folder or name: `InternalError` (zk_ee/src/system/errors/internal.rs:13, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — zk_ee/src/system/errors/internal.rs:13

What to do

  • Hide `basic_system.system_functions.bn254_ecadd` (`Bn254AddImpl`) (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 `basic_system.system_functions.bn254_ecmul` (`Bn254MulImpl`) (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 `basic_system.system_functions.bn254_pairing_check` (`Bn254PairingCheckImpl`) (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 `basic_system.system_functions.ecrecover` (`EcRecoverImpl`) (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 `basic_system.system_functions.keccak256` (`Keccak256Impl`) (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 `basic_system.system_functions.modexp` (`ModExpImpl`) (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 `basic_system.system_functions.p256_verify` (`P256VerifyImpl`) (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 `basic_system.system_functions.point_evaluation` (`PointEvaluationImpl`) (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 `basic_system.system_functions.ripemd160` (`RipeMd160Impl`) (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 `basic_system.system_functions.sha256` (`Sha256Impl`) (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 `proof_running_system.io_oracle` (`DummyCSRImpl`) (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 `solidity_abi.impls.byte_ref` (`Bytes`, `BytesOwned`, `BytesRef`, `BytesRefMut`) (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 `solidity_abi.impls.codable_array` (`Array`, `ArrayRef`, `ArrayRefMut`) (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 `solidity_abi.impls.codable_slice` (`Slice`, `SliceRef`, `SliceRefMut`) (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 `solidity_abi.impls.string_ref` (`SolidityString`, `SolidityStringRef`, `SolidityStringRefMut`) (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 `solidity_abi.impls.uint_x` (`U256Ref`, `U256RefMut`, `U160Ref`, `U160RefMut`, `U128Ref`, `U128RefMut`, `Address`, `AddressRef`, and 1 more) (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 `zk_ee.system.errors.internal` (`InternalError`) (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.
P2 · Observability5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 2/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `circuit_test_program`, `crypto/src/blake2s/test_program`, `zksync_os`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

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.

  • `tests/contracts_sol/bench/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — tests/contracts_sol/bench/package.json:12

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release. — .github/workflows/release-binaries.yml:95

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P5 · DR & Backup4.0 / 10Weak✓ 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.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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.
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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.

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.

  • `bytereverse` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 68 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 `bytereverse` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:68
  • `as_limbs` is public and takes a `U256` 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 `as_limbs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:93
  • `as_limbs_mut` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 98 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 `as_limbs_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:98
  • `is_zero` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 103 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_zero` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:103
  • `is_one` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 108 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_one` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:108
  • `overflowing_add_assign` is public and takes a `U256` 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 `overflowing_add_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:113
  • `overflowing_sub_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 133 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 `overflowing_sub_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:133
  • `widening_mul_assign` is public and takes a `U256` 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 `widening_mul_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:159
  • `widening_mul_assign_into` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 165 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 `widening_mul_assign_into` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:165
  • `to_le_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 214 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 `to_le_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:214
  • `to_be_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 218 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 `to_be_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:218
  • `bit_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 222 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 `bit_len` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:222
  • `leading_zeros` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 226 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 `leading_zeros` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:226
  • `bit` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 235 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 `bit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/risc_v/mod.rs:235
  • `as_limbs` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 94 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 `as_limbs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:94
  • `as_limbs_mut` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 99 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 `as_limbs_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:99
  • `is_zero` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 104 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_zero` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:104
  • `overflowing_add` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 122 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 `overflowing_add` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:122
  • `overflowing_sub` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 136 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 `overflowing_sub` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:136
  • `to_le_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 195 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 `to_le_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:195
  • `to_be_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 199 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 `to_be_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:199
  • `bit_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 203 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 `bit_len` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:203
  • `byte` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 225 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 `byte` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:225
  • `bit` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 229 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 `bit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:229
  • `byte_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 256 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 `byte_len` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:256
  • `checked_add` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 260 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 `checked_add` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:260
  • `checked_sub` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 264 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 `checked_sub` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:264
  • `checked_mul` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 268 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 `checked_mul` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:268
  • `add_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 349 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_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:349
  • `sub_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 356 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 `sub_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:356
  • `bitxor_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 363 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 `bitxor_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:363
  • `bitand_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 370 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 `bitand_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:370
  • `bitor_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 377 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 `bitor_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:377
  • `shr_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 384 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 `shr_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:384
  • `shl_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 391 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 `shl_assign` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — supporting_crates/u256/src/naive/mod.rs:391
  • `fmt` is public, takes a document from its caller (line 220) and hands it to `fmt_with_indent`, which calls itself at line 185 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 `fmt_with_indent` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — forward_system/src/system/tracers/call_tracer.rs:185
  • `update` is public and takes a `Blake2s256` as its receiver from its caller, and it calls itself at line 51 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` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — crypto/src/blake2s/naive.rs:51
  • `finalize` is public and takes a `Blake2s256` as its receiver from its caller, and it calls itself at line 57 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 `finalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — crypto/src/blake2s/naive.rs:57
  • `finalize_reset` is public and takes a `Blake2s256` as its receiver from its caller, and it calls itself at line 63 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 `finalize_reset` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — crypto/src/blake2s/naive.rs:63

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.
X18 · Disposal-pattern correctness6.1 / 10Adequate✓ Tool-verified

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.

  • `handle` (line 21) is a `BufWriter` this function owns and never releases: no `flush()` (or `into_inner()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a buffered writer that is dropped flushes and throws the error away, so a failed write reports success. Release it where the work ends. — forward_system/src/system/logger.rs:21

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.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob6.7 / 10Strong✓ Tool-verified

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.

  • `DeProxy._marker` 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. — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:905

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.
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. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items 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.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

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.

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.

X5 · Nullable reference types8.9 / 10Exemplary✓ Tool-verified

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.

  • `run_result.state.registers[10..18].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `run_and_get_effective_cycles_inner` 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`). — zksync_os_runner/src/lib.rs:92
  • `file.read_to_end(&mut buffer)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `run_and_get_effective_cycles` 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`). — zksync_os_runner/src/lib.rs:121
  • `file.read_to_end(&mut buffer)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `simulate_witness_tracing` 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`). — zksync_os_runner/src/lib.rs:141
  • `words_written.checked_mul(USIZE_SIZE)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `drop` 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`). — zk_ee/src/utils/aligned_vector.rs:231
  • `self.b[self.b_idx].as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `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`). — zk_ee/src/utils/exact_size_chain.rs:129
  • `self.raw_query(query_type,hash)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `expose_preimage` 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`). — zk_ee/src/oracle/mod.rs:130
  • `self.iterator.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `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`). — zk_ee/src/oracle/usize_serialization/dyn_usize_iterator.rs:58
  • `self.history.top_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update` 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`). — zk_ee/src/common_structs/history_counter.rs:37
  • `self.0.value()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `value` 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`). — zk_ee/src/common_structs/history_counter.rs:76
  • `Self::Nothing.compression_length(initial_value,final_value)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_length_u256_optional` 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`). — zk_ee/src/common_structs/pubdata_compression.rs:140
  • `optimal_strategy.compression_length(initial_value,final_value)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_u256` 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`). — zk_ee/src/common_structs/pubdata_compression.rs:169
  • `optimal_strategy.compress(initial_value,final_value,dst,result_keeper)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_u256` 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`). — zk_ee/src/common_structs/pubdata_compression.rs:184
  • `self.buffer.top_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_element` 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`). — zk_ee/src/common_structs/history_map/element_pool.rs:38
  • `first_removed_record.as_mut().previous.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rollback` 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`). — zk_ee/src/common_structs/history_map/element_with_history.rs:79
  • `.previous.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `rollback` 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`). — zk_ee/src/common_structs/history_map/element_with_history.rs:97
  • `head_mut.previous.replace(self.initial)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `commit` 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`). — zk_ee/src/common_structs/history_map/element_with_history.rs:145
  • `self.btree.get_mut(&key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rollback` 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`). — zk_ee/src/common_structs/history_map/mod.rs:175
  • `self.btree.get_mut(key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `commit` 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`). — zk_ee/src/common_structs/history_map/mod.rs:197
  • `self.btree.get(k)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `iter_altered_since_commit` 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`). — zk_ee/src/common_structs/history_map/mod.rs:262
  • `self.btree.get_mut(&k)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `apply_to_last_record_of_pending_changes` 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`). — zk_ee/src/common_structs/history_map/mod.rs:279
  • `data[64..96].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `interop_root_reporter_event_hook` 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`). — system_hooks/src/event_hooks/interop_root_reporter.rs:68
  • `calldata[32..64].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `contract_deployer_hook_inner` 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`). — system_hooks/src/call_hooks/contract_deployer_temp.rs:174
  • `calldata[96..128].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `contract_deployer_hook_inner` 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`). — system_hooks/src/call_hooks/contract_deployer_temp.rs:184
  • `calldata[32..64].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `set_bytecode_on_address_hook_inner` 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`). — system_hooks/src/call_hooks/set_bytecode_on_address.rs:150
  • `calldata[96..128].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `set_bytecode_on_address_hook_inner` 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`). — system_hooks/src/call_hooks/set_bytecode_on_address.rs:162
  • `path.segments.last()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `append_to_selector` 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`). — supporting_crates/solidity_abi_derive/src/derive_selector.rs:90
  • `args.iter().filter_map(|arg|match arg{GenericArgument::Type(inner_type)=>Some(inner_type),_=>None,}).next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `append_to_selector` 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`). — supporting_crates/solidity_abi_derive/src/derive_selector.rs:105
  • `args.iter().filter_map(|arg|match arg{GenericArgument::Const(size)=>Some(size),_=>None,}).next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `append_to_selector` 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`). — supporting_crates/solidity_abi_derive/src/derive_selector.rs:116
  • `args.iter().filter_map(|arg|match arg{GenericArgument::Type(typed)=>Some(typed.clone()),_=>None,}).next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `append_to_selector` 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`). — supporting_crates/solidity_abi_derive/src/derive_selector.rs:139
  • `parse_str("SolidityCodableReflectionRef")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `derive` 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`). — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:34
  • `parse_str("SolidityCodableReflectionRefMut")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `derive` 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`). — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:35
  • `field.ident.clone()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `derive` 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`). — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:145
  • `syn::parse::<TypePath>(ts)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `get_equivalent_type_recursive` 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) — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:360, supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:367
  • `syn::parse::<TypePath>(ts)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `get_equivalent_mut_type_recursive` 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) — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:382, supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:389
  • `syn::parse_str(&witness_ident_str)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `get_reflection_ident` 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`). — supporting_crates/solidity_abi_derive/src/utils.rs:35
  • `syn::parse_str(&witness_ident_str)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `get_reflection_mut_ident` 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`). — supporting_crates/solidity_abi_derive/src/utils.rs:41
  • `local_head.as_chunks::<32>().0.iter().next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `parse` 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`). — supporting_crates/solidity_abi/src/impls/byte_ref.rs:61
  • `local_tail.as_chunks::<32>().0.iter().next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `parse` 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`). — supporting_crates/solidity_abi/src/impls/byte_ref.rs:68

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.

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.

LensScoreRatingImpact
Code Health77.8StrongSolid.
Architecture95.2ExemplaryStrongest area.
Maturity65.7Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness57.1AdequateLargest drag on the score — prioritise here.
Security58.8Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 1 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.

  • X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: this repository stores data through 'oracle' (zk_ee/src/utils/bytes32.rs:3) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'oracle' (zk_ee/src/utils/bytes32.rs:3) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'oracle' (zk_ee/src/utils/bytes32.rs:3) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 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 — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) 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
  • AX6 Interface segregation — no interface, protocol or abstract type declares an operation an implementer must write
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — \"deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT} bullseye main\" > /etc/apt/sources.list; echo \"deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT} bullseye-security main\" >> /etc/apt/sources.list; apt-get -o Acquire::Check-Valid-Until=false update" did not complete successfully: exit code: 100; likely cause (the repository): a RUN step of the repository's REDACTED exited with code 100 (`/bin/sh -c set -eux; printf 'Acquire::Check-Valid-Until \"false\";\\n' > /etc/apt/apt.conf.d/99snapshot; printf 'Acq…`): the build's own command failed, for example a compile or test error; runtime evidence skipped The cause is in the repository, not in our sandbox: a RUN step of the repository's REDACTED exited with code 100 (`/bin/sh -c set -eux; printf 'Acquire::Check-Valid-Until \"false\";\\n' > /etc/apt/apt.conf.d/99snapshot; printf 'Acq…`): the build's own command failed, for example a compile or test error. Nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: this repository stores data through 'oracle' (zk_ee/src/utils/bytes32.rs:3) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • 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.
  • D10 Test Quality — ~36523 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
  • D12 Dependency Hygiene — Not scored — 73 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed REDACTED resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • 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.
  • 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 — this repository's production source is .py, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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 — not scored — this repository shows only 1 of the 3 signals this lens looks for (77 value object(s))
  • 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
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • 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 Python, 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • 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.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — No web surface: 485 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; 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.
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not 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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 0% of this repository's production lines — rust (131,776 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • 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.

Critical — 65 finding(s)
D29 · Static Analysis (SAST) · 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
  • REDACTED
  • + 13 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: io_subsystem.rs ↔ lib.rs basic_system/src/system_implementation/system/io_subsystem.rs:1 — `basic_system/src/system_implementation/system/io_subsystem.rs` (context basic_system) and `evm_interpreter/src/lib.rs` (context evm_interpreter) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `be15cc07` fix!: charge gas in system contract hooks (#318); `92701c71` revert: Revert "feat: Enable evm refunds by default" (#303); `8846e7ae` feat: Enable evm refunds by default (#280) — run `git show` on any of them.
  • Boundary-crossing change coupling: lib.rs ↔ storage_model.rs evm_interpreter/src/lib.rs:1 — `evm_interpreter/src/lib.rs` (context evm_interpreter) and `storage_models/src/common_structs/traits/storage_model.rs` (context storage_models) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `92701c71` revert: Revert "feat: Enable evm refunds by default" (#303); `8846e7ae` feat: Enable evm refunds by default (#280); `ca1ce6ee` revert: Revert "feat: Enable EVM refunds by default (#278)" (#279) — run `git show` on any of them.
  • Boundary-crossing change coupling: mod.rs ↔ lib.rs basic_system/src/system_implementation/flat_storage_model/mod.rs:1 — `basic_system/src/system_implementation/flat_storage_model/mod.rs` (context basic_system) and `evm_interpreter/src/lib.rs` (context evm_interpreter) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `92701c71` revert: Revert "feat: Enable evm refunds by default" (#303); `8846e7ae` feat: Enable evm refunds by default (#280); `ca1ce6ee` revert: Revert "feat: Enable EVM refunds by default (#278)" (#279) — run `git show` on any of them.
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 626 finding(s)
D17 · Explicit Debt · TodoComment · ×108
  • TodoComment zksync_os_runner/src/lib.rs:89 — // TODO: move to new simulator — 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 zksync_os/src/main.rs:151 — // TODO: disable global alloc once dependencies are fixed — 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 proof_running_system/src/system/bootloader.rs:110 — // TODO: disable global alloc once dependencies are fixed — 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 zksync_os/src/main.rs:240 — // TODO(EVM-1189): remove machine_default_start_trap entry point to binary.
  • TodoComment zk_ee/src/utils/usize_rw.rs:29 — // TODO actual checking? — 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 zk_ee/src/utils/usize_rw.rs:137 — // TODO actual checking? — 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 zk_ee/src/utils/usize_rw.rs:183 — // TODO: specialize in case of aligned iterator — 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 zk_ee/src/system/mod.rs:35 — /// TODO: this constant belongs to EVM EE — 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 zk_ee/src/system/mod.rs:437 — /// TODO: debug implementation for ruint types uses global alloc, which panics in ZKsync OS — 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 zk_ee/src/system/metadata/zk_metadata.rs:1 — //! TODO: this actually belongs to the bootloader, just for the ZK STF. — 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 zk_ee/src/system/execution_environment/call_params.rs:87 — // TODO: should not be part of this enum — 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 zk_ee/src/storage_types/mod.rs:9 — // TODO(EVM-1167): cleanup
  • TodoComment zk_ee/src/oracle/usize_serialization/dyn_usize_iterator.rs:23 — // TODO: eventually we will get in-place constructors — 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 zk_ee/src/memory/stack_implementations/skip_list_stack.rs:110 — // TODO: implement customized iter_skip_n for better performance — 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 zk_ee/src/memory/stack_implementations/skip_list_stack.rs:111 — // TODO: optimized 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 zk_ee/src/common_structs/logs_storage.rs:189 — // TODO: double check that we should have 4 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 zk_ee/src/common_structs/logs_storage.rs:501 — // TODO: move into const — 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 zk_ee/src/common_structs/logs_storage.rs:509 — // TODO: move into const — 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 zk_ee/src/common_structs/warm_storage_value.rs:7 — /// TODO: replace with a simple struct. — 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 tests/rig/src/chain.rs:302 — // TODO: should we init it somewhere else? — 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 tests/rig/src/chain.rs:325 — // TODO: should we init it somewhere else? — 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 tests/rig/src/chain.rs:375 — /// TODO: duplicated from API, unify. — 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 tests/rig/src/chain.rs:1284 — // TODO: utils? — 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 tests/rig/src/chain.rs:1316 — // TODO: fix — 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 tests/rig/src/revm_consistency_checker.rs:59 — // TODO meaningless 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.
  • + 83 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 zksync_os_runner/src/lib.rs:92 — `run_result.state.registers[10..18].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `run_and_get_effective_cycles_inner` 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 zksync_os_runner/src/lib.rs:121 — `file.read_to_end(&mut buffer)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `run_and_get_effective_cycles` 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 zksync_os_runner/src/lib.rs:141 — `file.read_to_end(&mut buffer)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `simulate_witness_tracing` 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 zk_ee/src/utils/aligned_vector.rs:231 — `words_written.checked_mul(USIZE_SIZE)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `drop` 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 zk_ee/src/utils/exact_size_chain.rs:129 — `self.b[self.b_idx].as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `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 zk_ee/src/oracle/mod.rs:130 — `self.raw_query(query_type,hash)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `expose_preimage` 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 zk_ee/src/oracle/usize_serialization/dyn_usize_iterator.rs:58 — `self.iterator.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `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 zk_ee/src/common_structs/history_counter.rs:37 — `self.history.top_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `update` 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 zk_ee/src/common_structs/history_counter.rs:76 — `self.0.value()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `value` 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 zk_ee/src/common_structs/pubdata_compression.rs:140 — `Self::Nothing.compression_length(initial_value,final_value)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_length_u256_optional` 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 zk_ee/src/common_structs/pubdata_compression.rs:169 — `optimal_strategy.compression_length(initial_value,final_value)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_u256` 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 zk_ee/src/common_structs/pubdata_compression.rs:184 — `optimal_strategy.compress(initial_value,final_value,dst,result_keeper)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `optimal_compression_u256` 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 zk_ee/src/common_structs/history_map/element_pool.rs:38 — `self.buffer.top_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_element` 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 zk_ee/src/common_structs/history_map/element_with_history.rs:79 — `first_removed_record.as_mut().previous.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rollback` 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 zk_ee/src/common_structs/history_map/element_with_history.rs:97 — `.previous.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `rollback` 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 zk_ee/src/common_structs/history_map/element_with_history.rs:145 — `head_mut.previous.replace(self.initial)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `commit` 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 zk_ee/src/common_structs/history_map/mod.rs:175 — `self.btree.get_mut(&key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `rollback` 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 zk_ee/src/common_structs/history_map/mod.rs:197 — `self.btree.get_mut(key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `commit` 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 zk_ee/src/common_structs/history_map/mod.rs:262 — `self.btree.get(k)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `iter_altered_since_commit` 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 zk_ee/src/common_structs/history_map/mod.rs:279 — `self.btree.get_mut(&k)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `apply_to_last_record_of_pending_changes` 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 system_hooks/src/event_hooks/interop_root_reporter.rs:68 — `data[64..96].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `interop_root_reporter_event_hook` 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 system_hooks/src/call_hooks/contract_deployer_temp.rs:174 — `calldata[32..64].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `contract_deployer_hook_inner` 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 system_hooks/src/call_hooks/contract_deployer_temp.rs:184 — `calldata[96..128].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `contract_deployer_hook_inner` 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 system_hooks/src/call_hooks/set_bytecode_on_address.rs:150 — `calldata[32..64].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `set_bytecode_on_address_hook_inner` 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 system_hooks/src/call_hooks/set_bytecode_on_address.rs:162 — `calldata[96..128].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `set_bytecode_on_address_hook_inner` 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×39
  • Recursive walk over a caller-supplied document has no depth cap supporting_crates/u256/src/risc_v/mod.rs:68 — `bytereverse` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 68 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 `bytereverse` 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 supporting_crates/u256/src/risc_v/mod.rs:93 — `as_limbs` is public and takes a `U256` 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 `as_limbs` 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 supporting_crates/u256/src/risc_v/mod.rs:98 — `as_limbs_mut` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 98 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 `as_limbs_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 supporting_crates/u256/src/risc_v/mod.rs:103 — `is_zero` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 103 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_zero` 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 supporting_crates/u256/src/risc_v/mod.rs:108 — `is_one` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 108 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_one` 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 supporting_crates/u256/src/risc_v/mod.rs:113 — `overflowing_add_assign` is public and takes a `U256` 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 `overflowing_add_assign` 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 supporting_crates/u256/src/risc_v/mod.rs:133 — `overflowing_sub_assign` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 133 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 `overflowing_sub_assign` 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 supporting_crates/u256/src/risc_v/mod.rs:159 — `widening_mul_assign` is public and takes a `U256` 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 `widening_mul_assign` 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 supporting_crates/u256/src/risc_v/mod.rs:165 — `widening_mul_assign_into` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 165 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 `widening_mul_assign_into` 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 supporting_crates/u256/src/risc_v/mod.rs:214 — `to_le_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 214 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 `to_le_bytes` 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 supporting_crates/u256/src/risc_v/mod.rs:218 — `to_be_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 218 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 `to_be_bytes` 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 supporting_crates/u256/src/risc_v/mod.rs:222 — `bit_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 222 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 `bit_len` 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 supporting_crates/u256/src/risc_v/mod.rs:226 — `leading_zeros` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 226 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 `leading_zeros` 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 supporting_crates/u256/src/risc_v/mod.rs:235 — `bit` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 235 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 `bit` 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 supporting_crates/u256/src/naive/mod.rs:94 — `as_limbs` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 94 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 `as_limbs` 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 supporting_crates/u256/src/naive/mod.rs:99 — `as_limbs_mut` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 99 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 `as_limbs_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 supporting_crates/u256/src/naive/mod.rs:104 — `is_zero` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 104 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_zero` 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 supporting_crates/u256/src/naive/mod.rs:122 — `overflowing_add` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 122 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 `overflowing_add` 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 supporting_crates/u256/src/naive/mod.rs:136 — `overflowing_sub` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 136 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 `overflowing_sub` 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 supporting_crates/u256/src/naive/mod.rs:195 — `to_le_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 195 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 `to_le_bytes` 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 supporting_crates/u256/src/naive/mod.rs:199 — `to_be_bytes` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 199 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 `to_be_bytes` 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 supporting_crates/u256/src/naive/mod.rs:203 — `bit_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 203 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 `bit_len` 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 supporting_crates/u256/src/naive/mod.rs:225 — `byte` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 225 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 `byte` 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 supporting_crates/u256/src/naive/mod.rs:229 — `bit` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 229 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 `bit` 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 supporting_crates/u256/src/naive/mod.rs:256 — `byte_len` is public and takes a `U256` as its receiver from its caller, and it calls itself at line 256 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 `byte_len` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×13
  • FileTooLong: deflate/core.rs supporting_crates/nostd_compression/src/deflate/core.rs — FileTooLong — 1467 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 967 over it, 2.93× 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: flat_storage_model/simple_growable_storage.rs basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs — FileTooLong — 1093 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 593 over it, 2.19× 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: flat_storage_model/account_cache.rs basic_system/src/system_implementation/flat_storage_model/account_cache.rs — FileTooLong — 940 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: NewModelAccountCache (2 blocks, 78-1259). The bar is 500 significant lines; this is 440 over it, 1.88× 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: zk/mod.rs basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs — FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: ZkTransactionFlowOnlyEOA (3 blocks, 47-948). The bar is 500 significant lines; this is 175 over it, 1.35× 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: mpt/trie.rs basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs — FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: EthereumMPT (2 blocks, 132-908). The bar is 500 significant lines; this is 147 over it, 1.29× 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: system/io_subsystem.rs basic_system/src/system_implementation/system/io_subsystem.rs — FileTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 94% of them inside a single declaration: FullIO (5 blocks, 39-824). The bar is 500 significant lines; this is 131 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: caches/account_cache.rs basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs — FileTooLong — 626 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: EthereumAccountCache (2 blocks, 62-855). The bar is 500 significant lines; this is 126 over it, 1.25× 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: zk/process_l1_transaction.rs basic_bootloader/src/bootloader/transaction_flow/zk/process_l1_transaction.rs — FileTooLong — 605 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 105 over it, 1.21× 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: delegation/bigint.rs basic_system/src/system_functions/modexp/delegation/bigint.rs — FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: BigintRepr (3 blocks, 21-738). The bar is 500 significant lines; this is 105 over it, 1.21× 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: bootloader/runner.rs basic_bootloader/src/bootloader/runner.rs — FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: ExecutionContext (2 blocks, 81-627). The bar is 500 significant lines; this is 103 over it, 1.21× 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: ethereum/mod.rs basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs — FileTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: EthereumTransactionFlow (3 blocks, 35-921). The bar is 500 significant lines; this is 101 over it, 1.20× 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: ethereum_storage_model/persist_changes.rs basic_system/src/system_implementation/ethereum_storage_model/persist_changes.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), about 76% of them inside a single declaration: EthereumStoragePersister (2 blocks, 74-864). The bar is 500 significant lines; this is 61 over it, 1.12× 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: fp/mod.rs crypto/src/ark_ff_delegation/fp/mod.rs — FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: Fp (64 blocks, 120-969). The bar is 500 significant lines; this is 45 over it, 1.09× 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×13
  • Duplicated block (7 lines × 2) basic_bootloader/src/bootloader/block_flow/ethereum/eip_6110_deposit_events_parser/mod.rs:98 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_6110_deposit_events_parser/mod.rs:98-104 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_6110_deposit_events_parser/mod.rs:111-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 `basic_bootloader/src/bootloader/block_flow/ethereum/eip_6110_deposit_events_parser/mod.rs:98` 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) basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:196 — basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:196-202 | basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:264-270 — 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 `basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:196` 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) basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:62 — basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:62-68 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:110-116 — 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) crypto/src/bigint_delegation/delegation.rs:120 — crypto/src/bigint_delegation/delegation.rs:120-127 | supporting_crates/delegated_u256/src/delegation.rs:71-77 — 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 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) crypto/src/secp256k1/scalars/scalar32.rs:367 — crypto/src/secp256k1/scalars/scalar32.rs:367-373 | crypto/src/secp256k1/scalars/scalar64.rs:278-284 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 (7 lines × 2) crypto/src/secp256k1/scalars/scalar32.rs:462 — crypto/src/secp256k1/scalars/scalar32.rs:462-468 | crypto/src/secp256k1/scalars/scalar32.rs:479-485 — 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 `c1` to `u32` in one and `u32) -> (u32` 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) crypto/src/secp256k1/scalars/scalar64.rs:316 — crypto/src/secp256k1/scalars/scalar64.rs:316-322 | crypto/src/secp256k1/scalars/scalar64.rs:333-339 — 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 `c1` to `u64` in one and `u64) -> (u64` 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) supporting_crates/delegated_u256/src/arithmetic.rs:344 — supporting_crates/delegated_u256/src/arithmetic.rs:344-350 | supporting_crates/delegated_u256/src/arithmetic.rs:408-414 — 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 `supporting_crates/delegated_u256/src/arithmetic.rs:344` 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) basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:185 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:185-191 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:114-120 — `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs` and `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 96 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:185` 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, `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:113` calls `from_array`, `from` and `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:184` 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 (7 lines × 2) supporting_crates/modexp/src/mpnat.rs:523 — supporting_crates/modexp/src/mpnat.rs:523-529 | supporting_crates/modexp/src/mpnat.rs:591-597 — 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) supporting_crates/solidity_abi/src/impls/codable_array.rs:97 — supporting_crates/solidity_abi/src/impls/codable_array.rs:97-103 | supporting_crates/solidity_abi/src/impls/codable_array.rs:141-147 — 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 `supporting_crates/solidity_abi/src/impls/codable_array.rs:97` 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) crypto/src/secp256k1/points/jacobian.rs:29 — crypto/src/secp256k1/points/jacobian.rs:29-35 | crypto/src/secp256k1/points/jacobian.rs:197-203 — 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 (7 lines × 2) basic_system/src/system_functions/modexp/delegation/u256.rs:7 — basic_system/src/system_functions/modexp/delegation/u256.rs:7-13 | supporting_crates/delegated_u256/src/arithmetic.rs:10-16 — 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.
D3 · God Classes · MethodTooLong · ×11
  • MethodTooLong: EthereumStoragePersister.persist_changes basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:302 — MethodTooLong — persist_changes runs 337 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 237 over it, 3.37× 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: Interpreter.run evm_interpreter/src/interpreter.rs:115 — MethodTooLong — run runs 188 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 88 over it, 1.88× 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: ScalarInner.mul_inner crypto/src/secp256k1/scalars/scalar32.rs:180 — MethodTooLong — mul_inner runs 162 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 62 over it, 1.62× 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: ZKHeaderStructureTxLoop.loop_op basic_bootloader/src/bootloader/block_flow/zk/tx_loop.rs:22 — MethodTooLong — loop_op runs 146 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 46 over it, 1.46× 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: ZKHeaderStructurePostTxOpProvingSingleblockBatch.post_op basic_bootloader/src/bootloader/block_flow/zk/post_tx_op/post_tx_op_proving_singleblock_batch.rs:54 — MethodTooLong — post_op 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: EthereumMPT.get basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:253 — MethodTooLong — get runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BigintRepr.fma basic_system/src/system_functions/modexp/delegation/bigint.rs:523 — MethodTooLong — fma 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: EthereumMPT.descend_through_proof basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:623 — MethodTooLong — descend_through_proof runs 116 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 16 over it, 1.16× 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: Interpreter.start_executing_frame evm_interpreter/src/ee_trait_impl.rs:53 — MethodTooLong — start_executing_frame runs 110 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 10 over it, 1.10× 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: AccountProperties.diff_compression basic_system/src/system_implementation/flat_storage_model/account_cache_entry.rs:311 — MethodTooLong — diff_compression 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.
  • MethodTooLong: MPNat.modpow supporting_crates/modexp/src/mpnat.rs:179 — MethodTooLong — modpow runs 102 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 2 over it, 1.02× 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.
D3 · God Classes · ClassTooLong · ×11
  • ClassTooLong: NewModelAccountCache basic_system/src/system_implementation/flat_storage_model/account_cache.rs:78 — ClassTooLong — 876 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, 2 blocks, lines 78-1259. The bar is 400 significant lines; this is 476 over it, 2.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: FullIO basic_system/src/system_implementation/system/io_subsystem.rs:39 — ClassTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 5 blocks, lines 39-824. The bar is 400 significant lines; this is 192 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: EthereumAccountCache basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:62 — ClassTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 62-855. The bar is 400 significant lines; this is 168 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EthereumMPT basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:132 — ClassTooLong — 559 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, 2 blocks, lines 132-908. The bar is 400 significant lines; this is 159 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.
  • ClassTooLong: ZkTransactionFlowOnlyEOA basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:47 — ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 3 blocks, lines 47-948. The bar is 400 significant lines; this is 145 over it, 1.36× 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: BigintRepr basic_system/src/system_functions/modexp/delegation/bigint.rs:21 — ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 3 blocks, lines 21-738. The bar is 400 significant lines; this is 77 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: Fp crypto/src/ark_ff_delegation/fp/mod.rs:109 — ClassTooLong — 469 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 64 blocks, lines 120-969. The bar is 400 significant lines; this is 69 over it, 1.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: EthereumTransactionFlow basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:35 — ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 35-921. The bar is 400 significant lines; this is 60 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FlatTreeWithAccountsUnderHashesStorageModel basic_system/src/system_implementation/flat_storage_model/mod.rs:64 — ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 4 blocks, lines 64-626. The bar is 400 significant lines; this is 48 over it, 1.12× 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: EthereumStoragePersister basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:74 — ClassTooLong — 425 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, 2 blocks, lines 74-864. The bar is 400 significant lines; this is 25 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: FlatStorageCommitment basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:137 — ClassTooLong — 403 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 4 blocks, lines 137-795. The bar is 400 significant lines; this is 3 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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×9
  • Edited copy of a member (9 corresponding lines) crypto/src/bigint_delegation/u256.rs:78 — crypto/src/bigint_delegation/u256.rs:78-86 | crypto/src/secp256r1/field/fe64.rs:66-76 — 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) crypto/src/bls12_381/eip2537.rs:89 — crypto/src/bls12_381/eip2537.rs:89-97 | crypto/src/bls12_381/eip2537.rs:100-108 — 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) crypto/src/secp256k1/scalars/scalar32.rs:494 — crypto/src/secp256k1/scalars/scalar32.rs:494-502 | crypto/src/secp256k1/scalars/scalar64.rs:356-364 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:57 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:57-72 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:75-83 — 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) supporting_crates/solidity_abi/src/impls/codable_array.rs:185 — supporting_crates/solidity_abi/src/impls/codable_array.rs:185-193 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:177-185 — 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) supporting_crates/solidity_abi/src/impls/codable_array.rs:225 — supporting_crates/solidity_abi/src/impls/codable_array.rs:225-233 | supporting_crates/solidity_abi/src/impls/codable_slice.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) basic_system/src/system_implementation/flat_storage_model/preimage_cache.rs:188 — basic_system/src/system_implementation/flat_storage_model/preimage_cache.rs:188-198 | basic_system/src/system_implementation/ethereum_storage_model/caches/preimage.rs:135-143 — 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) supporting_crates/solidity_abi/src/impls/byte_ref.rs:133 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:133-141 | supporting_crates/solidity_abi/src/impls/string_ref.rs:116-124 — 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) forward_system/src/run/query_processors/ethereum_initial_account_state.rs:30 — forward_system/src/run/query_processors/ethereum_initial_account_state.rs:30-39 | forward_system/src/run/query_processors/ethereum_initial_storage_slot_value.rs:37-45 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:640 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:640-647 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:1139-1151 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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 `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:640` 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) crypto/src/bigint_delegation/delegation.rs:129 — crypto/src/bigint_delegation/delegation.rs:129-136 | crypto/src/bigint_delegation/delegation.rs:138-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) supporting_crates/delegated_u256/src/arithmetic.rs:328 — supporting_crates/delegated_u256/src/arithmetic.rs:328-335 | supporting_crates/delegated_u256/src/arithmetic.rs:392-399 — 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 `supporting_crates/delegated_u256/src/arithmetic.rs:328` 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) zk_ee/src/utils/integer_utils.rs:123 — zk_ee/src/utils/integer_utils.rs:123-130 | zk_ee/src/utils/integer_utils.rs:136-143 — 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 `zk_ee/src/utils/integer_utils.rs:123` 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 `src` to `B160` in one and `U256` 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) callable_oracles/src/hash_to_prime/common.rs:204 — callable_oracles/src/hash_to_prime/common.rs:204-211 | callable_oracles/src/hash_to_prime/evaluate.rs:37-44 — 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) crypto/src/bls12_381/curves/pairing_impl.rs:48 — crypto/src/bls12_381/curves/pairing_impl.rs:48-55 | crypto/src/bn254/curves/pairing_impl.rs:45-52 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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) crypto/src/secp256k1/scalars/scalar64.rs:14 — crypto/src/secp256k1/scalars/scalar64.rs:14-22 | crypto/src/secp256r1/field/fe64.rs:12-19 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:83 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:83-90 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:105-112 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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) crypto/src/secp256k1/scalars/scalar32.rs:506 — crypto/src/secp256k1/scalars/scalar32.rs:506-513 | crypto/src/secp256k1/scalars/scalar64.rs:346-353 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `a` to `u32` in one and `u64` 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.
D3 · God Classes · FunctionTooLong · ×8
  • FunctionTooLong: basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:101 — FunctionTooLong — basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction runs 217 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 117 over it, 2.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.
  • FunctionTooLong: solidity_abi_derive::solidity_codable_derive::derive supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:11 — FunctionTooLong — solidity_abi_derive::solidity_codable_derive::derive runs 207 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 107 over it, 2.07× 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: miniz_nostd_compression::deflate::core::compress_normal supporting_crates/nostd_compression/src/deflate/core.rs:1763 — FunctionTooLong — miniz_nostd_compression::deflate::core::compress_normal runs 141 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 41 over it, 1.41× 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: solidity_abi_derive::derive_selector::derive supporting_crates/solidity_abi_derive/src/derive_selector.rs:9 — FunctionTooLong — solidity_abi_derive::derive_selector::derive runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: basic_bootloader::bootloader::block_flow::ethereum::eip_7251_consolidation_contract::eip7251_system_part basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:41 — FunctionTooLong — basic_bootloader::bootloader::block_flow::ethereum::eip_7251_consolidation_contract::eip7251_system_part runs 138 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 38 over it, 1.38× 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: miniz_nostd_compression::deflate::core::compress_fast supporting_crates/nostd_compression/src/deflate/core.rs:1960 — FunctionTooLong — miniz_nostd_compression::deflate::core::compress_fast runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: basic_bootloader::bootloader::block_flow::ethereum::eip_7002_withdrawal_contract::eip7002_system_part basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:49 — FunctionTooLong — basic_bootloader::bootloader::block_flow::ethereum::eip_7002_withdrawal_contract::eip7002_system_part 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.
  • FunctionTooLong: crypto::bigint_delegation::u512::mul_assign_montgomery crypto/src/bigint_delegation/u512.rs:194 — FunctionTooLong — crypto::bigint_delegation::u512::mul_assign_montgomery runs 108 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 8 over it, 1.08× 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) · ×8
  • Edited copy of a member (10 corresponding lines) crypto/src/secp256r1/field/fe64.rs:171 — crypto/src/secp256r1/field/fe64.rs:171-183 | crypto/src/secp256r1/scalar/scalar64.rs:280-289 — 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) basic_system/src/system_functions/modexp/delegation/u256.rs:71 — basic_system/src/system_functions/modexp/delegation/u256.rs:71-80 | evm_interpreter/src/utils.rs:7-17 — 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) crypto/src/bls12_381/eip2537.rs:70 — crypto/src/bls12_381/eip2537.rs:70-79 | crypto/src/bls12_381/fields/fq.rs:490-501 — 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) basic_bootloader/src/bootloader/block_flow/ethereum/rlp_encodings/utils.rs:23 — basic_bootloader/src/bootloader/block_flow/ethereum/rlp_encodings/utils.rs:23-32 | basic_bootloader/src/bootloader/rlp.rs:108-117 — 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) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:485 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:485-494 | basic_system/src/system_implementation/flat_storage_model/mod.rs:540-549 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) supporting_crates/modexp/src/arith.rs:309 — supporting_crates/modexp/src/arith.rs:309-318 | supporting_crates/modexp/src/arith.rs:321-330 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:294 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:294-303 | basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:314-323 — 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) forward_system/src/run/query_processors/da_commitment_scheme.rs:32 — forward_system/src/run/query_processors/da_commitment_scheme.rs:32-41 | forward_system/src/run/query_processors/zk_proof_data.rs:40-49 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×8
  • Duplicated block (13 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:307 — basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:307-319 | basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:366-378 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:255 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:255-267 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:164-176 — 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 `basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:255` 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 before the matched lines, `basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:163` calls `Ok` and `basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:254` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:301 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:301-313 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:337-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:301` 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) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:391 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:391-403 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:414-426 — 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 `basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:391` 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 lines × 2) cycle_marker/src/lib.rs:59 — cycle_marker/src/lib.rs:59-71 | cycle_marker/src/lib.rs:79-91 — 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 (13 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:67 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:67-79 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:86-98 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) supporting_crates/solidity_abi/src/impls/byte_ref.rs:69 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:69-81 | supporting_crates/solidity_abi/src/impls/string_ref.rs:48-60 — before extracting anything, compare `supporting_crates/solidity_abi/src/impls/byte_ref.rs` and `supporting_crates/solidity_abi/src/impls/string_ref.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `supporting_crates/solidity_abi/src/impls/byte_ref.rs:69` 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 lines × 2) supporting_crates/solidity_abi/src/impls/byte_ref.rs:98 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:98-110 | supporting_crates/solidity_abi/src/impls/string_ref.rs:77-89 — before extracting anything, compare `supporting_crates/solidity_abi/src/impls/byte_ref.rs` and `supporting_crates/solidity_abi/src/impls/string_ref.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `supporting_crates/solidity_abi/src/impls/byte_ref.rs:98` 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 · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:626 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:626-636 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:534-544 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:626` 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) basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:102 — basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:102-112 | basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:174-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 `basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.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 (11 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:58 — basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:58-68 | basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:70-80 — 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) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:652 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:652-662 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:665-675 — 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 `basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:652` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) supporting_crates/solidity_abi/src/impls/codable_array.rs:109 — supporting_crates/solidity_abi/src/impls/codable_array.rs:109-119 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:116-126 — 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 (11 lines × 2) supporting_crates/solidity_abi/src/impls/codable_array.rs:153 — supporting_crates/solidity_abi/src/impls/codable_array.rs:153-163 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:152-162 — 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 (11 lines × 2) callable_oracles/src/hash_to_prime/compute.rs:68 — callable_oracles/src/hash_to_prime/compute.rs:68-78 | callable_oracles/src/hash_to_prime/verify.rs:94-104 — 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 (11 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:470 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:470-480 | basic_system/src/system_implementation/flat_storage_model/mod.rs:525-535 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs` and `basic_system/src/system_implementation/flat_storage_model/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×8
  • Duplicated block (9 lines × 2) basic_system/src/system_functions/modexp/delegation/bigint.rs:91 — basic_system/src/system_functions/modexp/delegation/bigint.rs:91-99 | basic_system/src/system_functions/modexp/delegation/bigint.rs:155-163 — 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 `basic_system/src/system_functions/modexp/delegation/bigint.rs:91` 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, `basic_system/src/system_functions/modexp/delegation/bigint.rs:164` calls `max` and `basic_system/src/system_functions/modexp/delegation/bigint.rs:101` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:561 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:561-569 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:792-800 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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, `basic_system/src/system_implementation/flat_storage_model/account_cache.rs:790` calls `clone` and `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:559` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:411 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:411-419 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:623-637 — 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 `basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:411` 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) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1194 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1194-1202 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1250-1258 — 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 `basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1194` 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) crypto/src/secp256k1/scalars/scalar32.rs:352 — crypto/src/secp256k1/scalars/scalar32.rs:352-360 | crypto/src/secp256k1/scalars/scalar64.rs:262-270 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 `crypto/src/secp256k1/scalars/scalar32.rs:352` 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) forward_system/src/run/query_processors/read_storage.rs:46 — forward_system/src/run/query_processors/read_storage.rs:46-54 | forward_system/src/run/query_processors/read_tree.rs:80-88 — 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 `forward_system/src/run/query_processors/read_storage.rs:46` 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) supporting_crates/solidity_abi/src/impls/uint_x.rs:28 — supporting_crates/solidity_abi/src/impls/uint_x.rs:28-36 | supporting_crates/solidity_abi/src/impls/uint_x.rs:142-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. Read the line range as the matched WINDOW rather than a finished unit: at `supporting_crates/solidity_abi/src/impls/uint_x.rs:28` 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) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:53 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:53-61 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:73-81 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×7
  • Edited copy of a member (11 corresponding lines) crypto/src/bigint_delegation/u512.rs:118 — crypto/src/bigint_delegation/u512.rs:118-128 | crypto/src/bigint_delegation/u512.rs:147-157 — 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) supporting_crates/solidity_abi/src/impls/uint_x.rs:26 — supporting_crates/solidity_abi/src/impls/uint_x.rs:26-36 | supporting_crates/solidity_abi/src/impls/uint_x.rs:140-150 — 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) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:203 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:203-213 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:219-229 — 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) zk_ee/src/utils/bytes32.rs:305 — zk_ee/src/utils/bytes32.rs:305-315 | zk_ee/src/utils/bytes32.rs:320-331 — 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) crypto/src/secp256k1/recover.rs:328 — crypto/src/secp256k1/recover.rs:328-338 | crypto/src/secp256k1/recover.rs:361-371 — 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) basic_system/src/system_implementation/ethereum_storage_model/vec_trait/bi_vec.rs:187 — basic_system/src/system_implementation/ethereum_storage_model/vec_trait/bi_vec.rs:187-197 | basic_system/src/system_implementation/ethereum_storage_model/vec_trait/bi_vec.rs:199-209 — 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) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:187 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:187-197 | basic_system/src/system_implementation/flat_storage_model/mod.rs:208-219 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×7
  • Edited copy of a member (8 corresponding lines) crypto/src/secp256k1/scalars/scalar32.rs:106 — crypto/src/secp256k1/scalars/scalar32.rs:106-113 | crypto/src/secp256k1/scalars/scalar64.rs:109-116 — 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) zk_ee/src/oracle/simple_oracle_query.rs:52 — zk_ee/src/oracle/simple_oracle_query.rs:52-59 | zk_ee/src/oracle/simple_oracle_query.rs:66-73 — 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) crypto/src/secp256k1/scalars/scalar32.rs:115 — crypto/src/secp256k1/scalars/scalar32.rs:115-124 | crypto/src/secp256k1/scalars/scalar64.rs:136-143 — 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) evm_interpreter/src/gas.rs:67 — evm_interpreter/src/gas.rs:67-74 | evm_interpreter/src/gas.rs:78-89 — 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) basic_system/src/system_functions/modexp/delegation/bigint.rs:27 — basic_system/src/system_functions/modexp/delegation/bigint.rs:27-34 | basic_system/src/system_functions/modexp/delegation/u256.rs:19-26 — 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) callable_oracles/src/lib.rs:52 — callable_oracles/src/lib.rs:52-59 | zk_ee/src/storage_types/mod.rs:55-62 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:50 — basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:50-58 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:59-66 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) basic_system/src/system_functions/modexp/delegation/bigint.rs:362 — basic_system/src/system_functions/modexp/delegation/bigint.rs:362-376 | basic_system/src/system_functions/modexp/delegation/bigint.rs:431-445 — 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 `basic_system/src/system_functions/modexp/delegation/bigint.rs:362` 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) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:167 — basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:167-181 | basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:220-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:405 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:405-419 | basic_system/src/system_implementation/flat_storage_model/mod.rs:469-483 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs` and `basic_system/src/system_implementation/flat_storage_model/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:405` 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) evm_interpreter/src/evm_stack.rs:215 — evm_interpreter/src/evm_stack.rs:215-229 | evm_interpreter/src/evm_stack.rs:251-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) forward_system/src/run/mod.rs:284 — forward_system/src/run/mod.rs:284-298 | forward_system/src/run/mod.rs:368-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) supporting_crates/solidity_abi/src/impls/codable_array.rs:119 — supporting_crates/solidity_abi/src/impls/codable_array.rs:119-133 | supporting_crates/solidity_abi/src/impls/codable_array.rs:163-177 — 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 `supporting_crates/solidity_abi/src/impls/codable_array.rs:119` 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 `source` to `&'a [u8]` in one and `&'a mut [u8]` 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) supporting_crates/solidity_abi/src/impls/uint_x.rs:41 — supporting_crates/solidity_abi/src/impls/uint_x.rs:41-55 | supporting_crates/solidity_abi/src/impls/uint_x.rs:155-169 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) callable_oracles/src/hash_to_prime/compute.rs:10 — callable_oracles/src/hash_to_prime/compute.rs:10-19 | callable_oracles/src/hash_to_prime/verify.rs:7-16 — 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 (10 lines × 2) crypto/src/bigint_delegation/u512.rs:258 — crypto/src/bigint_delegation/u512.rs:258-267 | crypto/src/bigint_delegation/u512.rs:346-355 — 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) crypto/src/bls12_381/curves/util.rs:193 — crypto/src/bls12_381/curves/util.rs:193-202 | crypto/src/bls12_381/curves/util.rs:228-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crypto/src/bls12_381/curves/util.rs:193` 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 (10 lines × 2) basic_bootloader/src/bootloader/block_flow/ethereum/block_data.rs:71 — basic_bootloader/src/bootloader/block_flow/ethereum/block_data.rs:71-80 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:77-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. 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) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:203 — basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:203-212 | basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:259-268 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:203` 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) crypto/src/secp256k1/points/affine.rs:211 — crypto/src/secp256k1/points/affine.rs:211-220 | crypto/src/secp256r1/points/affine.rs:62-72 — 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) basic_system/src/system_functions/ripemd160.rs:31 — basic_system/src/system_functions/ripemd160.rs:31-40 | basic_system/src/system_functions/sha256.rs:31-40 — 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.
IC1 · Incompleteness & stubs · Unfinished branch · ×7
  • Unfinished branch — a todo!() / unimplemented!() arm in a real function basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:201 — `find_insertion_strategy` 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 basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:207 — `find_insertion_strategy` 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 callable_oracles/src/hash_to_prime/evaluate.rs:49 — `process_buffered_query` 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 callable_oracles/src/utils/evaluate.rs:110 — `read_struct` 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 crypto/src/bigint_delegation/delegation.rs:184 — `bigint_op_delegation_with_carry_bit` 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 supporting_crates/solidity_abi/src/impls/codable_array.rs:123 — `parse` 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 supporting_crates/solidity_abi/src/impls/codable_array.rs:167 — `parse_mut` 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.
D2 · Cognitive Complexity · miniz_nostd_compression · ×6
  • miniz_nostd_compression::deflate::core::compress_fast (cognitive 79) supporting_crates/nostd_compression/src/deflate/core.rs:1960 — miniz_nostd_compression::deflate::core::compress_fast has cognitive complexity 79 (threshold 15). Drivers by points: if/else 17 (55 pts), loops 5 (12 pts), match/switch 3 (7 pts), boolean chains 5 (nesting depth added 49). 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.
  • miniz_nostd_compression::deflate::core::compress_normal (cognitive 72) supporting_crates/nostd_compression/src/deflate/core.rs:1763 — miniz_nostd_compression::deflate::core::compress_normal has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 12, loops 3 (7 pts), match/switch 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • miniz_nostd_compression::deflate::core::flush_block (cognitive 23) supporting_crates/nostd_compression/src/deflate/core.rs:1611 — miniz_nostd_compression::deflate::core::flush_block has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (6 pts), boolean chains 5 (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.
  • miniz_nostd_compression::deflate::core::compress_inner (cognitive 20) supporting_crates/nostd_compression/src/deflate/core.rs:2234 — miniz_nostd_compression::deflate::core::compress_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, match/switch 1 (2 pts) (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.
  • miniz_nostd_compression::deflate::core::compress_lz_codes (cognitive 19) supporting_crates/nostd_compression/src/deflate/core.rs:1498 — miniz_nostd_compression::deflate::core::compress_lz_codes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • miniz_nostd_compression::deflate::stream::deflate (cognitive 19) supporting_crates/nostd_compression/src/deflate/stream.rs:24 — miniz_nostd_compression::deflate::stream::deflate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) crypto/src/secp256k1/scalars/scalar32.rs:126 — crypto/src/secp256k1/scalars/scalar32.rs:126-138 | crypto/src/secp256k1/scalars/scalar64.rs:145-156 — 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) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1166 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1166-1185 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1230-1241 — 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) forward_system/src/system/tracers/call_tracer.rs:501 — forward_system/src/system/tracers/call_tracer.rs:501-515 | forward_system/src/system/tracers/call_tracer.rs:519-530 — 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) evm_interpreter/src/evm_stack.rs:126 — evm_interpreter/src/evm_stack.rs:126-137 | evm_interpreter/src/evm_stack.rs:140-153 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:89 — basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:89-100 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:96-108 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:67 — basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:67-79 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:75-86 — 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×6
  • Unfinished stub — body is todo!() / unimplemented!() basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:62 — `transaction_hash` 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!() basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:245 — `set_bytecode_details` 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 zk_ee/src/system/base_system_functions.rs:123 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:134 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:145 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:156 — `execute`'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.
IC1 · Incompleteness & stubs · Unfinished stub · ×6
  • Unfinished stub — body is todo!() / unimplemented!() basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:62 — `transaction_hash` 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!() basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:245 — `set_bytecode_details` 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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:123 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:134 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:145 — `execute`'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 — panics or fails with a "not implemented" message zk_ee/src/system/base_system_functions.rs:156 — `execute`'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.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) crypto/src/bls12_381/eip2537.rs:15 — crypto/src/bls12_381/eip2537.rs:15-28 | crypto/src/bls12_381/fields/fq.rs:504-519 — 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) crypto/src/bls12_381/eip2537.rs:38 — crypto/src/bls12_381/eip2537.rs:38-51 | crypto/src/bls12_381/eip2537.rs:54-67 — 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) crypto/src/secp256r1/context.rs:20 — crypto/src/secp256r1/context.rs:20-33 | crypto/src/secp256r1/verify.rs:99-112 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:314 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:314-327 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:501-514 — 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) forward_system/src/run/interface_impl.rs:42 — forward_system/src/run/interface_impl.rs:42-56 | forward_system/src/run/interface_impl.rs:77-90 — 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 · Duplicated block (17 lines × 2) · ×5
  • Duplicated block (17 lines × 2) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:42 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:42-58 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:84-100 — 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 (17 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:901 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:901-917 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:854-870 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:901` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:247 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:247-263 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:353-369 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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 `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crypto/src/bls12_381/curves/pairing_impl.rs:102 — crypto/src/bls12_381/curves/pairing_impl.rs:102-118 | crypto/src/bn254/curves/pairing_impl.rs:99-115 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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 `crypto/src/bls12_381/curves/pairing_impl.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 (17 lines × 2) system_hooks/src/call_hooks/contract_deployer_temp.rs:40 — system_hooks/src/call_hooks/contract_deployer_temp.rs:40-56 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:41-60 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.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. 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.
D2 · Cognitive Complexity · basic_bootloader · ×4
  • basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction (cognitive 59) basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:46 — basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction has cognitive complexity 59 (threshold 15). Drivers by points: if/else 34 (46 pts), match/switch 3 (7 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction (cognitive 30) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:101 — basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 3 (5 pts) (nesting depth added 7). 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.
  • basic_bootloader::bootloader::transaction_flow::zk::process_l1_transaction::process_l1_transaction (cognitive 29) basic_bootloader/src/bootloader/transaction_flow/zk/process_l1_transaction.rs:48 — basic_bootloader::bootloader::transaction_flow::zk::process_l1_transaction::process_l1_transaction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 7 (11 pts) (nesting depth added 7). 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.
  • basic_bootloader::bootloader::block_flow::ethereum::hooks::eip_2537::msm::msm (cognitive 27) basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:69 — basic_bootloader::bootloader::block_flow::ethereum::hooks::eip_2537::msm::msm has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EthereumMPT · ×4
  • EthereumMPT::descend_through_proof (cognitive 52) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:623 — EthereumMPT::descend_through_proof has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 2 (6 pts), boolean chains 5, match/switch 1 (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.
  • EthereumMPT::detach_branch_node (cognitive 33) basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:303 — EthereumMPT::detach_branch_node has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 1 (4 pts), loops 2 (3 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.
  • EthereumMPT::descend_through_existing_nodes (cognitive 29) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:429 — EthereumMPT::descend_through_existing_nodes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21 (28 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.
  • EthereumMPT::cascade_delete_subtree_step (cognitive 16) basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/delete_subtree.rs:11 — EthereumMPT::cascade_delete_subtree_step has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×4
  • Edited copy of a member (25 corresponding lines) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:32 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:32-62 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_2930_tx.rs:28-54 — 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) crypto/src/bls12_381/curves/pairing_impl.rs:265 — crypto/src/bls12_381/curves/pairing_impl.rs:265-289 | crypto/src/bn254/curves/pairing_impl.rs:283-307 — 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) crypto/src/blake2s/delegated_extended.rs:60 — crypto/src/blake2s/delegated_extended.rs:60-84 | crypto/src/blake2s/delegated_extended.rs:87-116 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:116 — basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:116-140 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:149-178 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:41 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:41-75 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:24-51 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:83-118 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/service_tx.rs:66-84 — 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:218 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:218-291 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:43-77 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:86-122 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:125-197 — 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) forward_system/src/run/mod.rs:136 — forward_system/src/run/mod.rs:136-180 | forward_system/src/run/mod.rs:283-318 | forward_system/src/run/mod.rs:367-420 | forward_system/src/run/mod.rs:431-467 — 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) zk_ee/src/utils/integer_utils.rs:109 — zk_ee/src/utils/integer_utils.rs:109-118 | zk_ee/src/utils/integer_utils.rs:121-130 | zk_ee/src/utils/integer_utils.rs:133-143 | zk_ee/src/utils/integer_utils.rs:146-158 — 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 (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) crypto/src/secp256r1/field/fe64.rs:295 — crypto/src/secp256r1/field/fe64.rs:295-311 | crypto/src/secp256r1/scalar/scalar64.rs:293-310 — 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) evm_interpreter/src/evm_stack.rs:156 — evm_interpreter/src/evm_stack.rs:156-172 | evm_interpreter/src/evm_stack.rs:175-193 — 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) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:76 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:76-95 | basic_system/src/system_implementation/flat_storage_model/mod.rs:100-116 — 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) zk_ee/src/common_structs/logs_storage.rs:117 — zk_ee/src/common_structs/logs_storage.rs:117-133 | zk_ee/src/common_structs/logs_storage.rs:135-151 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×4
  • Edited copy of a member (18 corresponding lines) crypto/src/ark_ff_delegation/const_helpers.rs:120 — crypto/src/ark_ff_delegation/const_helpers.rs:120-137 | crypto/src/ark_ff_delegation/const_helpers.rs:146-165 — 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) basic_system/src/system_functions/ripemd160.rs:46 — basic_system/src/system_functions/ripemd160.rs:46-65 | basic_system/src/system_functions/sha256.rs:46-63 — 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) crypto/src/bls12_381/curves/pairing_impl.rs:18 — crypto/src/bls12_381/curves/pairing_impl.rs:18-36 | crypto/src/bn254/curves/pairing_impl.rs:17-34 — 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) zk_ee/src/utils/aligned_vector.rs:117 — zk_ee/src/utils/aligned_vector.rs:117-135 | zk_ee/src/utils/aligned_vector.rs:141-158 — 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 · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) crypto/src/secp256k1/scalars/scalar32.rs:163 — crypto/src/secp256k1/scalars/scalar32.rs:163-178 | crypto/src/secp256k1/scalars/scalar64.rs:119-134 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 (16 lines × 2) forward_system/src/system/tracers/evm_opcodes_logger.rs:349 — forward_system/src/system/tracers/evm_opcodes_logger.rs:349-364 | forward_system/src/system/tracers/evm_opcodes_logger.rs:374-389 — 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 (16 lines × 2) supporting_crates/solidity_abi/src/impls/codable_slice.rs:19 — supporting_crates/solidity_abi/src/impls/codable_slice.rs:19-34 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:45-60 — 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 (16 lines × 2) crypto/src/bls12_381/curves/pairing_impl.rs:274 — crypto/src/bls12_381/curves/pairing_impl.rs:274-289 | crypto/src/bn254/curves/pairing_impl.rs:292-307 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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 `crypto/src/bls12_381/curves/pairing_impl.rs:274` 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 · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:316 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:316-327 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:503-514 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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 (12 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:386 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:386-397 | basic_system/src/system_implementation/flat_storage_model/mod.rs:450-462 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs` and `basic_system/src/system_implementation/flat_storage_model/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:386` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:117 — basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:117-130 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:150-161 — 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) basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:65 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:65-76 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:57-68 — `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs` and `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 96 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×4
  • Duplicated block (9–10 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:139 — basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:139-148 | basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:525-533 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:139` 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–10 lines × 2) crypto/src/bls12_381/eip2537.rs:20 — crypto/src/bls12_381/eip2537.rs:20-28 | crypto/src/bls12_381/fields/fq.rs:510-519 — 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 `crypto/src/bls12_381/eip2537.rs:20` 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) supporting_crates/delegated_u256/src/arithmetic.rs:322 — supporting_crates/delegated_u256/src/arithmetic.rs:322-331 | supporting_crates/delegated_u256/src/arithmetic.rs:338-346 — 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 `supporting_crates/delegated_u256/src/arithmetic.rs:322` 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 (9–10 lines × 2) supporting_crates/delegated_u256/src/arithmetic.rs:386 — supporting_crates/delegated_u256/src/arithmetic.rs:386-395 | supporting_crates/delegated_u256/src/arithmetic.rs:402-410 — 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 `supporting_crates/delegated_u256/src/arithmetic.rs:386` 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.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: const_keccak256 — const_keccak256: 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: delegated_u256 — delegated_u256: 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: modexp — modexp: 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: crypto — crypto: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: Fp (LCOM4 25) crypto/src/ark_ff_delegation/fp/mod.rs:109 — Fp's methods fall into 25 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 25 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: DelegatedU256 (LCOM4 16) supporting_crates/delegated_u256/src/lib.rs:12 — DelegatedU256's methods fall into 16 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 16 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: BigInt (LCOM4 8) crypto/src/ark_ff_delegation/biginteger/mod.rs:32 — BigInt's methods fall into 8 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 8 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: DelegatedU256 (LCOM4 5) basic_system/src/system_functions/modexp/delegation/u256.rs:16 — DelegatedU256'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.
D1 · Cyclomatic Complexity · basic_bootloader · ×3
  • basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction (cyclomatic 37) basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:46 — basic_bootloader::bootloader::transaction_flow::zk::validation_impl::validate_and_compute_fee_for_transaction has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction (cyclomatic 23) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:101 — basic_bootloader::bootloader::transaction_flow::ethereum::validation_impl::validate_and_compute_fee_for_transaction has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • basic_bootloader::bootloader::transaction_flow::zk::process_l1_transaction::process_l1_transaction (cyclomatic 19) basic_bootloader/src/bootloader/transaction_flow/zk/process_l1_transaction.rs:48 — basic_bootloader::bootloader::transaction_flow::zk::process_l1_transaction::process_l1_transaction has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · miniz_nostd_compression · ×3
  • miniz_nostd_compression::deflate::core::compress_normal (cyclomatic 34) supporting_crates/nostd_compression/src/deflate/core.rs:1763 — miniz_nostd_compression::deflate::core::compress_normal has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • miniz_nostd_compression::deflate::core::compress_fast (cyclomatic 26) supporting_crates/nostd_compression/src/deflate/core.rs:1960 — miniz_nostd_compression::deflate::core::compress_fast has cyclomatic complexity 26 (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.
  • miniz_nostd_compression::deflate::core::compress_inner (cyclomatic 17) supporting_crates/nostd_compression/src/deflate/core.rs:2234 — miniz_nostd_compression::deflate::core::compress_inner 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.
D1 · Cyclomatic Complexity · EthereumMPT · ×3
  • EthereumMPT::descend_through_proof (cyclomatic 23) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:623 — EthereumMPT::descend_through_proof 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.
  • EthereumMPT::descend_through_existing_nodes (cyclomatic 17) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:429 — EthereumMPT::descend_through_existing_nodes 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.
  • EthereumMPT::get (cyclomatic 16) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:253 — EthereumMPT::get has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · crypto · ×3
  • crypto::secp256k1::recover::ecmult (cognitive 26) crypto/src/secp256k1/recover.rs:77 — crypto::secp256k1::recover::ecmult has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, 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.
  • crypto::bls12_381::fields::fr::__gcd_inverse (cognitive 20) crypto/src/bls12_381/fields/fr.rs:134 — crypto::bls12_381::fields::fr::__gcd_inverse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • crypto::bn254::fields::fq::__gcd_inverse (cognitive 20) crypto/src/bn254/fields/fq.rs:149 — crypto::bn254::fields::fq::__gcd_inverse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HuffmanOxide · ×3
  • HuffmanOxide::calculate_minimum_redundancy (cognitive 25) supporting_crates/nostd_compression/src/deflate/core.rs:878 — HuffmanOxide::calculate_minimum_redundancy has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (8 pts), boolean chains 4, match/switch 1 (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.
  • HuffmanOxide::optimize_table (cognitive 22) supporting_crates/nostd_compression/src/deflate/core.rs:958 — HuffmanOxide::optimize_table has cognitive complexity 22 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 4 (7 pts) (nesting depth added 10). 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.
  • HuffmanOxide::start_dynamic_block (cognitive 21) supporting_crates/nostd_compression/src/deflate/core.rs:1065 — HuffmanOxide::start_dynamic_block has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Interpreter evm_interpreter/src/lib.rs:82 — TooManyMethods — 99 methods, declared across 10 files: instructions/host.rs (17), instructions/bitwise.rs (14), instructions/environment.rs (12), instructions/system.rs (12), +6 more file(s). The bar is 30 methods; this is 69 over it, 3.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EthereumMPT basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:132 — TooManyMethods — 56 methods, declared across 11 files: mpt/trie.rs (18), updates/mod.rs (15), updates/reattach.rs (8), updates/split_extension.rs (5), +7 more file(s). The bar is 30 methods; this is 26 over it, 1.87× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DelegatedU256 supporting_crates/delegated_u256/src/lib.rs:12 — TooManyMethods — 33 methods, declared across 2 files: src/arithmetic.rs (19), src/utils.rs (14). The bar is 30 methods; this is 3 over it, 1.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×3
  • Edited copy of a member (26 corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:235 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:235-269 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:275-300 — 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) crypto/src/bigint_delegation/u256.rs:257 — crypto/src/bigint_delegation/u256.rs:257-282 | crypto/src/bigint_delegation/u256.rs:313-340 — 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) basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:164 — basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:164-191 | basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:215-240 — 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 (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:352 — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:352-371 | supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:374-393 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:66 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:66-85 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:85-104 — 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) forward_system/src/system/tracers/evm_opcodes_logger.rs:81 — forward_system/src/system/tracers/evm_opcodes_logger.rs:81-102 | forward_system/src/system/tracers/evm_opcodes_logger.rs:113-132 — 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 (15 corresponding lines) · ×3
  • Edited copy of a member (15 corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:33 — basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:33-47 | basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/mod.rs:50-64 — 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) basic_system/src/system_functions/modexp/delegation/bigint.rs:88 — basic_system/src/system_functions/modexp/delegation/bigint.rs:88-102 | basic_system/src/system_functions/modexp/delegation/bigint.rs:152-167 — 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) crypto/src/secp256r1/scalar/scalar64.rs:130 — crypto/src/secp256r1/scalar/scalar64.rs:130-145 | crypto/src/secp256r1/scalar/scalar64.rs:147-161 — 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 · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:274 — basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:274-293 | zk_ee/src/common_structs/logs_storage.rs:423-442 — 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 `basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:274` 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) basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:463 — basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:463-482 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:520-539 — 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 `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:463` 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 (20 lines × 2) crypto/src/bls12_381/curves/pairing_impl.rs:65 — crypto/src/bls12_381/curves/pairing_impl.rs:65-84 | crypto/src/bn254/curves/pairing_impl.rs:62-81 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) crypto/src/secp256k1/field/mod.rs:169 — crypto/src/secp256k1/field/mod.rs:169-186 | crypto/src/secp256k1/field/mod.rs:191-208 — 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 (18 lines × 2) proof_running_system/src/talc/mod.rs:143 — proof_running_system/src/talc/mod.rs:143-160 | proof_running_system/src/talc/mod.rs:201-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `proof_running_system/src/talc/mod.rs:219` calls `Ok`, `slice_from_raw_parts`, `size` and `proof_running_system/src/talc/mod.rs:162` 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 (18 lines × 2) crypto/src/bls12_381/curves/pairing_impl.rs:294 — crypto/src/bls12_381/curves/pairing_impl.rs:294-311 | crypto/src/bn254/curves/pairing_impl.rs:312-329 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:259 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:259-264 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:110-115 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:168-173 — 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 (6 lines × 3) crypto/src/bigint_delegation/u256.rs:71 — crypto/src/bigint_delegation/u256.rs:71-76 | crypto/src/secp256r1/field/fe64.rs:50-56 | crypto/src/secp256r1/scalar/scalar64.rs:32-38 — 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 `crypto/src/bigint_delegation/u256.rs:71` 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) crypto/src/secp256k1/scalars/scalar32.rs:93 — crypto/src/secp256k1/scalars/scalar32.rs:93-98 | crypto/src/secp256k1/scalars/scalar64.rs:95-101 | crypto/src/secp256r1/scalar/mod.rs:140-146 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 `crypto/src/secp256k1/scalars/scalar32.rs:93` 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) basic_system/src/system_implementation/flat_storage_model/account_cache.rs:825 — basic_system/src/system_implementation/flat_storage_model/account_cache.rs:825-831 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:1047-1052 — 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 (6 lines × 2) crypto/src/bls12_381/curves/pairing_impl.rs:221 — crypto/src/bls12_381/curves/pairing_impl.rs:221-226 | crypto/src/bn254/curves/pairing_impl.rs:221-226 — before extracting anything, compare `crypto/src/bls12_381/curves/pairing_impl.rs` and `crypto/src/bn254/curves/pairing_impl.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 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 `crypto/src/bls12_381/curves/pairing_impl.rs:221` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) crypto/src/secp256r1/field/fe64.rs:39 — crypto/src/secp256r1/field/fe64.rs:39-44 | crypto/src/secp256r1/scalar/scalar64.rs:21-26 — 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 `crypto/src/secp256r1/field/fe64.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.
D1 · Cyclomatic Complexity · solidity_abi_derive · ×2
  • solidity_abi_derive::solidity_codable_derive::derive (cyclomatic 23) supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:11 — solidity_abi_derive::solidity_codable_derive::derive 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.
  • solidity_abi_derive::derive_selector::derive (cyclomatic 21) supporting_crates/solidity_abi_derive/src/derive_selector.rs:9 — solidity_abi_derive::derive_selector::derive has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (append_to_selector). 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.
D1 · Cyclomatic Complexity · MPNat · ×2
  • MPNat::modpow (cyclomatic 16) supporting_crates/modexp/src/mpnat.rs:179 — MPNat::modpow has cyclomatic complexity 16 (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.
  • MPNat::sub_to_same_size (cyclomatic 16) supporting_crates/modexp/src/mpnat.rs:469 — MPNat::sub_to_same_size has cyclomatic complexity 16 (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.
D2 · Cognitive Complexity · solidity_abi_derive · ×2
  • solidity_abi_derive::solidity_codable_derive::derive (cognitive 61) supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:11 — solidity_abi_derive::solidity_codable_derive::derive has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (39 pts), match/switch 7 (13 pts), loops 3 (9 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.
  • solidity_abi_derive::derive_selector::derive::append_to_selector (cognitive 23) supporting_crates/solidity_abi_derive/src/derive_selector.rs:84 — solidity_abi_derive::derive_selector::derive::append_to_selector has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 2 (6 pts), loops 1 (2 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.
D2 · Cognitive Complexity · BigintRepr · ×2
  • BigintRepr::fma (cognitive 54) basic_system/src/system_functions/modexp/delegation/bigint.rs:523 — BigintRepr::fma has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (44 pts), loops 4 (10 pts) (nesting depth added 33). 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.
  • BigintRepr::modpow (cognitive 23) basic_system/src/system_functions/modexp/delegation/bigint.rs:169 — BigintRepr::modpow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 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.
D2 · Cognitive Complexity · basic_system · ×2
  • basic_system::system_implementation::ethereum_storage_model::mpt::parse_node::parse_initial (cognitive 30) basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:125 — basic_system::system_implementation::ethereum_storage_model::mpt::parse_node::parse_initial has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 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.
  • basic_system::system_implementation::ethereum_storage_model::compare_bytes32_and_mpt_integer (cognitive 20) basic_system/src/system_implementation/ethereum_storage_model/mod.rs:37 — basic_system::system_implementation::ethereum_storage_model::compare_bytes32_and_mpt_integer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 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.
D2 · Cognitive Complexity · MPNat · ×2
  • MPNat::sub_to_same_size (cognitive 25) supporting_crates/modexp/src/mpnat.rs:469 — MPNat::sub_to_same_size has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 9). 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.
  • MPNat::modpow (cognitive 24) supporting_crates/modexp/src/mpnat.rs:179 — MPNat::modpow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 12 shared lines) · ×2
  • Near-duplicate member family (3 members, 12 shared lines) supporting_crates/solidity_abi/src/impls/byte_ref.rs:56 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:56-81 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:103-135 | supporting_crates/solidity_abi/src/impls/string_ref.rs:35-60 — These 3 members are variants of one another: a block of 12 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 3 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 3 times.
  • Near-duplicate member family (3 members, 12 shared lines) supporting_crates/solidity_abi/src/impls/byte_ref.rs:85 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:85-110 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:139-171 | supporting_crates/solidity_abi/src/impls/string_ref.rs:64-89 — These 3 members are variants of one another: a block of 12 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 3 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 3 times.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) crypto/src/secp256r1/field/fe64.rs:191 — crypto/src/secp256r1/field/fe64.rs:191-213 | crypto/src/secp256r1/scalar/scalar64.rs:253-276 — 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) basic_system/src/system_implementation/system/io_subsystem.rs:90 — basic_system/src/system_implementation/system/io_subsystem.rs:90-112 | basic_system/src/system_implementation/system/io_subsystem.rs:121-148 — 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 copy of a member (47 corresponding lines) · ×2
  • Edited copy of a member (47 corresponding lines) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:412 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:412-458 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:323-373 — 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) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:308 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:308-382 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:238-284 — 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 (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) basic_system/src/system_functions/bn254_ecadd.rs:48 — basic_system/src/system_functions/bn254_ecadd.rs:48-69 | basic_system/src/system_functions/bn254_ecmul.rs:46-72 — 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) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:237 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:237-258 | basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:277-301 — 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) crypto/src/ark_ff_delegation/biginteger/mod.rs:299 — crypto/src/ark_ff_delegation/biginteger/mod.rs:299-322 | crypto/src/ark_ff_delegation/biginteger/mod.rs:325-348 — 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) crypto/src/ark_ff_delegation/biginteger/mod.rs:670 — crypto/src/ark_ff_delegation/biginteger/mod.rs:670-693 | crypto/src/ark_ff_delegation/biginteger/mod.rs:718-742 — 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 (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) basic_bootloader/src/bootloader/transaction/rlp_encoded/eip_2718_tx_envelope.rs:29 — basic_bootloader/src/bootloader/transaction/rlp_encoded/eip_2718_tx_envelope.rs:29-48 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/legacy_tx.rs:135-150 — 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) cycle_marker/src/lib.rs:58 — cycle_marker/src/lib.rs:58-73 | cycle_marker/src/lib.rs:78-93 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1193 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1193-1213 | basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1249-1267 — 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) zk_ee/src/common_structs/logs_storage.rs:187 — zk_ee/src/common_structs/logs_storage.rs:187-211 | zk_ee/src/common_structs/logs_storage.rs:218-236 — 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 (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) crypto/src/secp256k1/context.rs:39 — crypto/src/secp256k1/context.rs:39-56 | crypto/src/secp256r1/context.rs:36-48 — 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) crypto/src/bls12_381/curves/g1.rs:120 — crypto/src/bls12_381/curves/g1.rs:120-132 | crypto/src/bls12_381/curves/g2.rs:136-148 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 6+ corresponding lines) crypto/src/secp256k1/scalars/scalar32.rs:85 — crypto/src/secp256k1/scalars/scalar32.rs:85-90 | crypto/src/secp256k1/scalars/scalar64.rs:87-92 | crypto/src/secp256r1/scalar/mod.rs:132-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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, 6+ corresponding lines) crypto/src/bls12_381/fields/fq.rs:73 — crypto/src/bls12_381/fields/fq.rs:73-79 | crypto/src/bls12_381/fields/fr.rs:72-77 | crypto/src/bn254/fields/fq.rs:114-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) basic_system/src/system_implementation/flat_storage_model/mod.rs:49 — basic_system/src/system_implementation/flat_storage_model/mod.rs:49-54 | zk_ee/src/utils/bytes32.rs:256-261 — 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) crypto/src/bigint_delegation/u256.rs:300 — crypto/src/bigint_delegation/u256.rs:300-306 | crypto/src/bigint_delegation/u512.rs:380-385 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:102 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:102-122 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:184-204 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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 `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.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 (21 lines × 2) system_hooks/src/call_hooks/contract_deployer_temp.rs:192 — system_hooks/src/call_hooks/contract_deployer_temp.rs:192-212 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:170-190 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.rs:192` 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, `system_hooks/src/call_hooks/contract_deployer_temp.rs:213` calls `Ok`, `Err` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs:206` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crypto/src/bls12_381/curves/util.rs:236 — crypto/src/bls12_381/curves/util.rs:236-243 | crypto/src/bls12_381/curves/util.rs:278-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crypto/src/bls12_381/curves/util.rs:236` 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–9 lines × 2) crypto/src/secp256r1/context.rs:21 — crypto/src/secp256r1/context.rs:21-28 | crypto/src/secp256r1/verify.rs:100-108 — 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 `crypto/src/secp256r1/context.rs:21` 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:48 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_4844_tx.rs:48-54 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:26-32 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:90-96 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/service_tx.rs:67-73 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs:25` calls `u256` and `basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/service_tx.rs:66` 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 (7 lines × 4) crypto/src/bigint_delegation/delegation.rs:129 — crypto/src/bigint_delegation/delegation.rs:129-136 | crypto/src/bigint_delegation/delegation.rs:138-145 | supporting_crates/delegated_u256/src/delegation.rs:79-85 | supporting_crates/delegated_u256/src/delegation.rs:87-93 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) basic_system/src/system_implementation/flat_storage_model/mod.rs:468 — basic_system/src/system_implementation/flat_storage_model/mod.rs:468-472 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:225-229 — 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 `basic_system/src/system_implementation/flat_storage_model/mod.rs:468` 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) crypto/src/bigint_delegation/u256.rs:82 — crypto/src/bigint_delegation/u256.rs:82-86 | crypto/src/bls12_381/curves/util.rs:127-131 — 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 `crypto/src/bigint_delegation/u256.rs:82` 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.
IC1 · Incompleteness & stubs · Hollow method · ×2
  • Hollow method — returns a constant without doing the work basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:282 — `calculate_pubdata_used_by_tx` 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 basic_system/src/system_implementation/ethereum_storage_model/caches/full_storage_cache.rs:208 — `calculate_pubdata_used_by_tx` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
IC1 · Incompleteness & stubs · Empty method body · ×2
  • Empty method body — does nothing with its inputs supporting_crates/u256/src/risc_v/mod.rs:397 — `add_assign` 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 supporting_crates/u256/src/risc_v/mod.rs:404 — `sub_assign` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
D1 · Cyclomatic Complexity · Interpreter · ×1
  • Interpreter::run (cyclomatic 155) evm_interpreter/src/interpreter.rs:115 — Interpreter::run has cyclomatic complexity 155 (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.
D1 · Cyclomatic Complexity · FlatStorageCommitment · ×1
  • FlatStorageCommitment::verify_and_apply_batch (cyclomatic 51) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:186 — FlatStorageCommitment::verify_and_apply_batch has cyclomatic complexity 51 (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.
D1 · Cyclomatic Complexity · EthereumStoragePersister · ×1
  • EthereumStoragePersister::persist_changes (cyclomatic 27) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:302 — EthereumStoragePersister::persist_changes has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · crypto · ×1
  • crypto::secp256k1::recover::ecmult (cyclomatic 18) crypto/src/secp256k1/recover.rs:77 — crypto::secp256k1::recover::ecmult 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.
D1 · Cyclomatic Complexity · BigintRepr · ×1
  • BigintRepr::fma (cyclomatic 17) basic_system/src/system_functions/modexp/delegation/bigint.rs:523 — BigintRepr::fma 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.
D1 · Cyclomatic Complexity · parse_flamegraph.format_report (cyclomatic 17) · ×1
  • parse_flamegraph.format_report (cyclomatic 17) bench_scripts/parse_flamegraph.py:350 — parse_flamegraph.format_report 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.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment tests/instances/transactions/src/lib.rs:32 — // FIXME: this address looks very similar to bridgehub/shared bridge on gateway. — 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.
D17 · Explicit Debt · HackComment · ×1
  • HackComment supporting_crates/solidity_abi/src/impls/mod.rs:62 — // hack around slice indexing — 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.
D2 · Cognitive Complexity · FlatStorageCommitment · ×1
  • FlatStorageCommitment::verify_and_apply_batch (cognitive 125) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:186 — FlatStorageCommitment::verify_and_apply_batch has cognitive complexity 125 (threshold 15). Drivers by points: if/else 42 (88 pts), match/switch 9 (27 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 66). 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.
D2 · Cognitive Complexity · EthereumStoragePersister · ×1
  • EthereumStoragePersister::persist_changes (cognitive 92) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:302 — EthereumStoragePersister::persist_changes has cognitive complexity 92 (threshold 15). Drivers by points: if/else 36 (83 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 50). 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.
D2 · Cognitive Complexity · ZKHeaderStructureTxLoop · ×1
  • ZKHeaderStructureTxLoop::loop_op (cognitive 41) basic_bootloader/src/bootloader/block_flow/zk/tx_loop.rs:22 — ZKHeaderStructureTxLoop::loop_op has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 4 (16 pts), boolean chains 2, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DictOxide · ×1
  • DictOxide::find_match (cognitive 38) supporting_crates/nostd_compression/src/deflate/core.rs:1259 — DictOxide::find_match has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EthereumLikeStorageAccessCostModel · ×1
  • EthereumLikeStorageAccessCostModel::refund_for_storage_write (cognitive 33) basic_system/src/system_implementation/system/mod.rs:118 — EthereumLikeStorageAccessCostModel::refund_for_storage_write has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 1 (nesting depth added 20). 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.
D2 · Cognitive Complexity · EthereumAccountCache · ×1
  • EthereumAccountCache::materialize_element (cognitive 28) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:93 — EthereumAccountCache::materialize_element has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 3 (5 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.
D2 · Cognitive Complexity · parse_flamegraph.format_report (cognitive 27) · ×1
  • parse_flamegraph.format_report (cognitive 27) bench_scripts/parse_flamegraph.py:350 — parse_flamegraph.format_report has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse_flamegraph.build_tree (cognitive 26) · ×1
  • parse_flamegraph.build_tree (cognitive 26) bench_scripts/parse_flamegraph.py:209 — parse_flamegraph.build_tree has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Bn254 · ×1
  • Bn254::multi_miller_loop (cognitive 24) crypto/src/bn254/curves/pairing_impl.rs:95 — Bn254::multi_miller_loop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse_flamegraph.collapse_path (cognitive 24) · ×1
  • parse_flamegraph.collapse_path (cognitive 24) bench_scripts/parse_flamegraph.py:298 — parse_flamegraph.collapse_path has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (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.
D2 · Cognitive Complexity · AccountProperties · ×1
  • AccountProperties::diff_compression (cognitive 23) basic_system/src/system_implementation/flat_storage_model/account_cache_entry.rs:311 — AccountProperties::diff_compression has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RlpEncodedTxInner · ×1
  • RlpEncodedTxInner::parse_and_compute_signed_hash (cognitive 22) basic_bootloader/src/bootloader/transaction/rlp_encoded/mod.rs:49 — RlpEncodedTxInner::parse_and_compute_signed_hash has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · ETHMPTInternerExt · ×1
  • ETHMPTInternerExt::intern_nibbles (cognitive 22) basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:20 — ETHMPTInternerExt::intern_nibbles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · BytecodeAndAccountDataPreimagesStorage · ×1
  • BytecodeAndAccountDataPreimagesStorage::expose_preimage (cognitive 22) basic_system/src/system_implementation/flat_storage_model/preimage_cache.rs:83 — BytecodeAndAccountDataPreimagesStorage::expose_preimage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (6 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.
D2 · Cognitive Complexity · EthereumAccountProperties · ×1
  • EthereumAccountProperties::parse_from_rlp_bytes (cognitive 19) basic_system/src/system_implementation/ethereum_storage_model/caches/account_properties.rs:218 — EthereumAccountProperties::parse_from_rlp_bytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbiEncodedTransaction · ×1
  • AbiEncodedTransaction::validate_structure (cognitive 18) basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:233 — AbiEncodedTransaction::validate_structure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 5, boolean chains 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.
D2 · Cognitive Complexity · callable_oracles · ×1
  • callable_oracles::hash_to_prime::common::miller_rabin_u32 (cognitive 17) callable_oracles/src/hash_to_prime/common.rs:141 — callable_oracles::hash_to_prime::common::miller_rabin_u32 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 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.
D2 · Cognitive Complexity · Bls12_381 · ×1
  • Bls12_381::multi_miller_loop (cognitive 17) crypto/src/bls12_381/curves/pairing_impl.rs:98 — Bls12_381::multi_miller_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter · ×1
  • Interpreter::create_immediate_return_state (cognitive 17) evm_interpreter/src/interpreter.rs:327 — Interpreter::create_immediate_return_state has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare_bench.parse_cycle_markers (cognitive 17) · ×1
  • compare_bench.parse_cycle_markers (cognitive 17) REDACTED:8 — compare_bench.parse_cycle_markers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecutionContext · ×1
  • ExecutionContext::perform_transfer_if_required (cognitive 16) basic_bootloader/src/bootloader/runner.rs:325 — ExecutionContext::perform_transfer_if_required has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 2, boolean chains 1 (nesting depth added 7). 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.
D2 · Cognitive Complexity · FlatStorageBacking · ×1
  • FlatStorageBacking::insert_at_position (cognitive 16) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1577 — FlatStorageBacking::insert_at_position has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare_bench.main (cognitive 16) · ×1
  • compare_bench.main (cognitive 16) REDACTED:43 — compare_bench.main has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (5 pts), loops 3 (4 pts), ternaries 2 (4 pts), if/else 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse_flamegraph._strip_generic_params (cognitive 16) · ×1
  • parse_flamegraph._strip_generic_params (cognitive 16) bench_scripts/parse_flamegraph.py:122 — parse_flamegraph._strip_generic_params has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: mod.rs ↔ io_subsystem.rs basic_system/src/system_implementation/flat_storage_model/mod.rs:1 — `basic_system/src/system_implementation/flat_storage_model/mod.rs` and `basic_system/src/system_implementation/system/io_subsystem.rs` change together 75% of the time (18 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `e43a695c` fix: fixes for gas estimation (#504); `22750ef3` feat: introduce da commitment generator abstraction (#354); `718789fa` feat: Migrate stack trait changes from V2 (#322) — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 29 shared lines) · ×1
  • Near-duplicate member family (4 members, 29 shared lines) system_hooks/src/call_hooks/contract_deployer_temp.rs:24 — system_hooks/src/call_hooks/contract_deployer_temp.rs:24-110 | system_hooks/src/call_hooks/l1_messenger.rs:29-106 | system_hooks/src/call_hooks/mint_base_token.rs:24-116 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:24-109 — These 4 members are variants of one another: a block of 29 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.
D4 · Code Duplication · Near-duplicate member family (3 members, 6 shared lines) · ×1
  • Near-duplicate member family (3 members, 6 shared lines) crypto/src/bigint_delegation/u256.rs:61 — crypto/src/bigint_delegation/u256.rs:61-76 | crypto/src/secp256r1/field/fe64.rs:38-56 | crypto/src/secp256r1/scalar/scalar64.rs:20-38 — These 3 members are variants of one another: a block of 6 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 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) crypto/src/secp256k1/scalars/scalar32.rs:180 — crypto/src/secp256k1/scalars/scalar32.rs:180-360 | crypto/src/secp256k1/scalars/scalar64.rs:180-270 — 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 · Near-duplicate member pair (28 shared lines) · ×1
  • Near-duplicate member pair (28 shared lines) supporting_crates/solidity_abi/src/impls/codable_array.rs:95 — supporting_crates/solidity_abi/src/impls/codable_array.rs:95-133 | supporting_crates/solidity_abi/src/impls/codable_array.rs:139-177 — These two members are variants of one another: 28 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 · Near-duplicate member pair (21 shared lines) · ×1
  • Near-duplicate member pair (21 shared lines) crypto/src/bigint_delegation/delegation.rs:101 — crypto/src/bigint_delegation/delegation.rs:101-185 | supporting_crates/delegated_u256/src/delegation.rs:56-122 — These two members are variants of one another: 21 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (178 corresponding lines) · ×1
  • Edited copy of a member (178 corresponding lines) basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:55 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:55-277 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:47-224 — These two members are one piece of code written twice and then edited apart: 178 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) supporting_crates/delegated_u256/src/arithmetic.rs:311 — supporting_crates/delegated_u256/src/arithmetic.rs:311-370 | supporting_crates/delegated_u256/src/arithmetic.rs:374-433 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (88 corresponding lines) · ×1
  • Edited copy of a member (88 corresponding lines) basic_system/src/system_implementation/flat_storage_model/account_cache.rs:789 — basic_system/src/system_implementation/flat_storage_model/account_cache.rs:789-899 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:919-1006 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:637 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:637-720 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:1134-1228 — 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 (99 corresponding lines) · ×1
  • Edited copy of a member (99 corresponding lines) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:495 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:495-655 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:449-547 — These two members are one piece of code written twice and then edited apart: 99 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (71 corresponding lines) · ×1
  • Edited copy of a member (71 corresponding lines) system_hooks/src/call_hooks/contract_deployer_temp.rs:125 — system_hooks/src/call_hooks/contract_deployer_temp.rs:125-215 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:120-190 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) crypto/src/bls12_381/fields/fr.rs:134 — crypto/src/bls12_381/fields/fr.rs:134-196 | crypto/src/bn254/fields/fq.rs:149-211 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:185 — basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:185-239 | basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/msm.rs:253-308 — 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 (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:82 — basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:82-146 | basic_system/src/system_implementation/ethereum_storage_model/mpt/interner/ext_impls.rs:154-218 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (53 corresponding lines) · ×1
  • Edited copy of a member (53 corresponding lines) basic_system/src/system_functions/modexp/delegation/bigint.rs:358 — basic_system/src/system_functions/modexp/delegation/bigint.rs:358-412 | basic_system/src/system_functions/modexp/delegation/bigint.rs:428-480 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) crypto/src/secp256r1/points/jacobian.rs:90 — crypto/src/secp256r1/points/jacobian.rs:90-162 | crypto/src/secp256r1/points/jacobian.rs:165-226 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (116 corresponding lines) · ×1
  • Edited copy of a member (116 corresponding lines) basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:178 — basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:178-293 | zk_ee/src/common_structs/logs_storage.rs:322-442 — These two members are one piece of code written twice and then edited apart: 116 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) crypto/src/secp256k1/recover.rs:276 — crypto/src/secp256k1/recover.rs:276-326 | crypto/src/secp256r1/wnaf.rs:25-73 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/mappings.rs:19 — basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/mappings.rs:19-55 | basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/mappings.rs:69-104 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) crypto/src/bls12_381/curves/pairing_impl.rs:291 — crypto/src/bls12_381/curves/pairing_impl.rs:291-311 | crypto/src/bn254/curves/pairing_impl.rs:309-329 — 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 (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) proof_running_system/src/talc/mod.rs:126 — proof_running_system/src/talc/mod.rs:126-163 | proof_running_system/src/talc/mod.rs:189-225 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:692 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:692-729 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:644-683 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/addition.rs:20 — basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/addition.rs:20-47 | basic_bootloader/src/bootloader/block_flow/ethereum/hooks/eip_2537/addition.rs:61-88 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:246 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:246-280 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:352-389 — 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 copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) crypto/src/bls12_381/curves/util.rs:146 — crypto/src/bls12_381/curves/util.rs:146-178 | crypto/src/bls12_381/curves/util.rs:182-213 | crypto/src/bls12_381/curves/util.rs:217-250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) crypto/src/secp256k1/scalars/scalar32.rs:92 — crypto/src/secp256k1/scalars/scalar32.rs:92-104 | crypto/src/secp256k1/scalars/scalar64.rs:94-107 | crypto/src/secp256r1/scalar/mod.rs:139-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:208 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:208-235 | basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:474-501 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:672-701 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) evm_interpreter/src/evm_stack.rs:209 — evm_interpreter/src/evm_stack.rs:209-233 | evm_interpreter/src/evm_stack.rs:238-269 | evm_interpreter/src/evm_stack.rs:272-296 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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, 12+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 12+ corresponding lines) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:89 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:89-100 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:102-113 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:148-159 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:243-254 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:276-287 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) supporting_crates/solidity_abi/src/impls/uint_x.rs:61 — supporting_crates/solidity_abi/src/impls/uint_x.rs:61-115 | supporting_crates/solidity_abi/src/impls/uint_x.rs:175-190 | supporting_crates/solidity_abi/src/impls/uint_x.rs:196-211 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 16+ corresponding lines) basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:382 — basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:382-397 | basic_system/src/system_implementation/ethereum_storage_model/storage_model.rs:401-419 | basic_system/src/system_implementation/flat_storage_model/mod.rs:447-462 | basic_system/src/system_implementation/flat_storage_model/mod.rs:466-483 | basic_system/src/system_implementation/flat_storage_model/storage_cache.rs:223-242 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 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) crypto/src/secp256k1/scalars/scalar32.rs:461 — crypto/src/secp256k1/scalars/scalar32.rs:461-474 | crypto/src/secp256k1/scalars/scalar32.rs:478-490 | crypto/src/secp256k1/scalars/scalar64.rs:315-328 | crypto/src/secp256k1/scalars/scalar64.rs:332-343 — 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 (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:161 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:161-170 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:289-298 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:300-309 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction.rs:311-320 — 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 copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) basic_bootloader/src/bootloader/block_flow/ethereum/rlp_encodings/utils.rs:6 — basic_bootloader/src/bootloader/block_flow/ethereum/rlp_encodings/utils.rs:6-18 | basic_bootloader/src/bootloader/transaction/rlp_encoded/rlp/mod.rs:20-32 | basic_bootloader/src/bootloader/transaction/rlp_encoded/rlp/mod.rs:34-44 — 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, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) evm_interpreter/src/evm_stack.rs:299 — evm_interpreter/src/evm_stack.rs:299-310 | evm_interpreter/src/evm_stack.rs:313-324 | evm_interpreter/src/evm_stack.rs:327-338 — 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) · ×1
  • Edited copies of one member (5 members, 11+ corresponding lines) basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:409 — basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:409-419 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:421-431 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:433-443 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:445-455 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:457-467 — 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 (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) zk_ee/src/system/metadata/dynamic_metadata_responder.rs:16 — zk_ee/src/system/metadata/dynamic_metadata_responder.rs:16-20 | zk_ee/src/system/metadata/dynamic_metadata_responder.rs:22-26 — 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 copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) crypto/src/secp256k1/points/affine.rs:41 — crypto/src/secp256k1/points/affine.rs:41-47 | crypto/src/secp256k1/points/jacobian.rs:28-35 | crypto/src/secp256k1/points/jacobian.rs:196-203 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) crypto/src/bls12_381/fields/fq.rs:170 — crypto/src/bls12_381/fields/fq.rs:170-176 | crypto/src/bn254/fields/fq.rs:140-146 — 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.
D4 · Code Duplication · Duplicated block (105 lines × 2) · ×1
  • Duplicated block (105 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:745 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:745-849 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:698-802 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:179 — basic_bootloader/src/bootloader/block_flow/zk/batch_data.rs:179-272 | zk_ee/src/common_structs/logs_storage.rs:323-416 — 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.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) basic_system/src/system_implementation/flat_storage_model/account_cache.rs:840 — basic_system/src/system_implementation/flat_storage_model/account_cache.rs:840-889 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:949-998 — 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 `basic_system/src/system_implementation/flat_storage_model/account_cache.rs:840` 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.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:149 — supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:149-197 | supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:199-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:149` 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 · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) crypto/src/bls12_381/fields/fr.rs:152 — crypto/src/bls12_381/fields/fr.rs:152-196 | crypto/src/bn254/fields/fq.rs:167-211 — 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 `crypto/src/bls12_381/fields/fr.rs:152` 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 · Duplicated block (23–38 lines × 2) · ×1
  • Duplicated block (23–38 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:345 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:345-382 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:262-284 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:345` 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 · Duplicated block (19–38 lines × 2) · ×1
  • Duplicated block (19–38 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:524 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:524-561 | basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:613-631 — 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 `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:524` 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 · Duplicated block (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) basic_system/src/system_functions/modexp/delegation/bigint.rs:378 — basic_system/src/system_functions/modexp/delegation/bigint.rs:378-412 | basic_system/src/system_functions/modexp/delegation/bigint.rs:447-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 `basic_system/src/system_functions/modexp/delegation/bigint.rs:378` 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 · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:218 — basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:218-246 | basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:273-300 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:218` 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 · Duplicated block (12–27 lines × 2) · ×1
  • Duplicated block (12–27 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:556 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:556-582 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:477-488 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:556` 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 · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:682 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:682-704 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:1188-1211 — before extracting anything, compare `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs` and `basic_system/src/system_implementation/flat_storage_model/account_cache.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 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 `basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:682` 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:240 — basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:240-263 | basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:272-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/reattach.rs:240` 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 · Duplicated block (16–24 lines × 2) · ×1
  • Duplicated block (16–24 lines × 2) crypto/src/secp256k1/scalars/scalar32.rs:191 — crypto/src/secp256k1/scalars/scalar32.rs:191-214 | crypto/src/secp256k1/scalars/scalar64.rs:184-199 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 `crypto/src/secp256k1/scalars/scalar32.rs:191` 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 · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:142 — basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:142-163 | basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:175-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `basic_system/src/system_implementation/ethereum_storage_model/mpt/parse_node.rs:142` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) crypto/src/bigint_delegation/u512.rs:211 — crypto/src/bigint_delegation/u512.rs:211-230 | crypto/src/bigint_delegation/u512.rs:299-319 — 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crypto/src/secp256k1/recover.rs:305 — crypto/src/secp256k1/recover.rs:305-323 | crypto/src/secp256r1/wnaf.rs:50-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. Read the line range as the matched WINDOW rather than a finished unit: at `crypto/src/secp256k1/recover.rs:305` 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 · Duplicated block (17–19 lines × 4) · ×1
  • Duplicated block (17–19 lines × 4) system_hooks/src/call_hooks/contract_deployer_temp.rs:58 — system_hooks/src/call_hooks/contract_deployer_temp.rs:58-76 | system_hooks/src/call_hooks/l1_messenger.rs:68-86 | system_hooks/src/call_hooks/mint_base_token.rs:56-72 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:65-81 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.rs:58` 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 · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:41 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:41-59 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_2930_tx.rs:35-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:41` 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.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) system_hooks/src/call_hooks/contract_deployer_temp.rs:85 — system_hooks/src/call_hooks/contract_deployer_temp.rs:85-103 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:86-102 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.rs:85` 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 · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:125 — basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:125-140 | basic_system/src/system_implementation/ethereum_storage_model/caches/account_cache.rs:162-178 — 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.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) crypto/src/blake2s/test_program/src/main.rs:24 — crypto/src/blake2s/test_program/src/main.rs:24-40 | zksync_os/src/main.rs:158-170 — 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 `crypto/src/blake2s/test_program/src/main.rs:24` 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 · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:36 — basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:36-49 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_2930_tx.rs:31-42 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/legacy_tx.rs:35-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_1559_tx.rs:35` calls `u256` and `basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_2930_tx.rs:30` 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.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) basic_bootloader/src/bootloader/transaction/rlp_encoded/eip_2718_tx_envelope.rs:31 — basic_bootloader/src/bootloader/transaction/rlp_encoded/eip_2718_tx_envelope.rs:31-44 | basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/legacy_tx.rs:137-147 — 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 `basic_bootloader/src/bootloader/transaction/rlp_encoded/eip_2718_tx_envelope.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. 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378-391 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:424-440 — 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 `basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378` 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 · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) basic_system/src/system_implementation/flat_storage_model/account_cache.rs:872 — basic_system/src/system_implementation/flat_storage_model/account_cache.rs:872-884 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:981-993 | basic_system/src/system_implementation/flat_storage_model/account_cache.rs:1085-1097 — 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 `basic_system/src/system_implementation/flat_storage_model/account_cache.rs:872` 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 · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:173 — basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:173-185 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:188-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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 before the matched lines, `basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:186` calls `parse_bytes32_vector` and `basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:172` 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:693 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:693-704 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:645-657 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:693` 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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) system_hooks/src/call_hooks/contract_deployer_temp.rs:99 — system_hooks/src/call_hooks/contract_deployer_temp.rs:99-110 | system_hooks/src/call_hooks/l1_messenger.rs:95-106 | system_hooks/src/call_hooks/mint_base_token.rs:105-116 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:98-109 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.rs:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) zk_ee/src/common_structs/pubdata_compression.rs:83 — zk_ee/src/common_structs/pubdata_compression.rs:83-93 | zk_ee/src/common_structs/pubdata_compression.rs:99-109 | zk_ee/src/common_structs/pubdata_compression.rs:113-124 — 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 `zk_ee/src/common_structs/pubdata_compression.rs:83` 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 · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:215 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:215-229 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:153-169 — `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs` and `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 96 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:153` 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 · Duplicated block (3–12 lines × 4) · ×1
  • Duplicated block (3–12 lines × 4) crypto/src/secp256k1/scalars/scalar32.rs:270 — crypto/src/secp256k1/scalars/scalar32.rs:270-281 | crypto/src/secp256k1/scalars/scalar32.rs:313-315 | crypto/src/secp256k1/scalars/scalar64.rs:217-228 | crypto/src/secp256k1/scalars/scalar64.rs:236-238 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crypto/src/secp256k1/scalars/scalar32.rs:270` calls `sumadd_fast` and `crypto/src/secp256k1/scalars/scalar32.rs:313` 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.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) evm_interpreter/src/evm_stack.rs:159 — evm_interpreter/src/evm_stack.rs:159-168 | evm_interpreter/src/evm_stack.rs:178-189 — 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 `evm_interpreter/src/evm_stack.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.
D4 · Code Duplication · Duplicated block (1–12 lines × 3) · ×1
  • Duplicated block (1–12 lines × 3) supporting_crates/solidity_abi/src/impls/uint_x.rs:115 — supporting_crates/solidity_abi/src/impls/uint_x.rs:115-115 | supporting_crates/solidity_abi/src/impls/uint_x.rs:179-190 | supporting_crates/solidity_abi/src/impls/uint_x.rs:200-211 — 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 `supporting_crates/solidity_abi/src/impls/uint_x.rs:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) system_hooks/src/call_hooks/contract_deployer_temp.rs:166 — system_hooks/src/call_hooks/contract_deployer_temp.rs:166-177 | system_hooks/src/call_hooks/set_bytecode_on_address.rs:146-153 — before extracting anything, compare `system_hooks/src/call_hooks/contract_deployer_temp.rs` and `system_hooks/src/call_hooks/set_bytecode_on_address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 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 `system_hooks/src/call_hooks/contract_deployer_temp.rs:166` 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 · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) forward_system/src/run/mod.rs:155 — forward_system/src/run/mod.rs:155-165 | forward_system/src/run/mod.rs:300-310 | forward_system/src/run/mod.rs:397-407 | forward_system/src/run/mod.rs:446-456 — 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) basic_system/src/system_functions/bn254_ecmul.rs:52 — basic_system/src/system_functions/bn254_ecmul.rs:52-60 | basic_system/src/system_functions/ecrecover.rs:48-58 | basic_system/src/system_functions/p256_verify.rs:68-76 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `basic_system/src/system_functions/bn254_ecmul.rs:52` 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.
D4 · Code Duplication · Duplicated block (6–11 lines × 3) · ×1
  • Duplicated block (6–11 lines × 3) basic_bootloader/src/bootloader/transaction/authorization_list.rs:248 — basic_bootloader/src/bootloader/transaction/authorization_list.rs:248-258 | basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:211-216 | basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:268-278 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction/authorization_list.rs:248` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `basic_bootloader/src/bootloader/transaction_flow/zk/validation_impl.rs:267` calls `copy_from_slice` and `basic_bootloader/src/bootloader/transaction_flow/ethereum/validation_impl.rs:210` 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:243 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:243-253 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:279-287 — 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 `basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:243` 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 · Duplicated block (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:476 — basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:476-481 | basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:509-517 — 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 `basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs:509` 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 · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) supporting_crates/modexp/src/arith.rs:67 — supporting_crates/modexp/src/arith.rs:67-85 | supporting_crates/modexp/src/arith.rs:128-146 — 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 `supporting_crates/modexp/src/arith.rs:67` 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 · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:553 — basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:553-561 | basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:623-631 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:475-482 | basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:532-539 — `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs` and `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 242 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:553` 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 before the matched lines, `basic_bootloader/src/bootloader/transaction_flow/zk/mod.rs:475` calls `map_err` and `basic_bootloader/src/bootloader/transaction_flow/ethereum/mod.rs:553` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) evm_interpreter/src/evm_stack.rs:141 — evm_interpreter/src/evm_stack.rs:141-148 | evm_interpreter/src/evm_stack.rs:157-164 | evm_interpreter/src/evm_stack.rs:176-183 — 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 `evm_interpreter/src/evm_stack.rs:141` 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crypto/src/secp256k1/scalars/scalar32.rs:94 — crypto/src/secp256k1/scalars/scalar32.rs:94-99 | crypto/src/secp256k1/scalars/scalar64.rs:96-102 — before extracting anything, compare `crypto/src/secp256k1/scalars/scalar32.rs` and `crypto/src/secp256k1/scalars/scalar64.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 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 `crypto/src/secp256k1/scalars/scalar32.rs:94` 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.
D4 · Code Duplication · Duplicated block (6 lines × 14) · ×1
  • Duplicated block (6 lines × 14) supporting_crates/solidity_abi/src/impls/byte_ref.rs:58 — supporting_crates/solidity_abi/src/impls/byte_ref.rs:58-63 | supporting_crates/solidity_abi/src/impls/byte_ref.rs:65-70 | supporting_crates/solidity_abi/src/impls/byte_ref.rs:87-92 | supporting_crates/solidity_abi/src/impls/byte_ref.rs:94-99 | supporting_crates/solidity_abi/src/impls/codable_array.rs:105-110 | supporting_crates/solidity_abi/src/impls/codable_array.rs:149-154 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:105-110 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:112-117 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:141-146 | supporting_crates/solidity_abi/src/impls/codable_slice.rs:148-153 | supporting_crates/solidity_abi/src/impls/string_ref.rs:37-42 | supporting_crates/solidity_abi/src/impls/string_ref.rs:44-49 | supporting_crates/solidity_abi/src/impls/string_ref.rs:66-71 | supporting_crates/solidity_abi/src/impls/string_ref.rs:73-78 — before extracting anything, compare `supporting_crates/solidity_abi/src/impls/byte_ref.rs` and `supporting_crates/solidity_abi/src/impls/string_ref.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) zk_ee/src/utils/integer_utils.rs:110 — zk_ee/src/utils/integer_utils.rs:110-113 | zk_ee/src/utils/integer_utils.rs:123-127 | zk_ee/src/utils/integer_utils.rs:136-140 | zk_ee/src/utils/integer_utils.rs:151-155 — 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 `zk_ee/src/utils/integer_utils.rs:110` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `&U256` in one and `B160` 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, `zk_ee/src/utils/integer_utils.rs:113` calls `as_limbs_mut`, `as_limbs` and `zk_ee/src/utils/integer_utils.rs:127` 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.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) basic_system/src/system_functions/bn254_ecadd.rs:86 — basic_system/src/system_functions/bn254_ecadd.rs:86-90 | basic_system/src/system_functions/bn254_ecmul.rs:86-88 | basic_system/src/system_functions/bn254_pairing_check.rs:99-104 | basic_system/src/system_functions/bn254_pairing_check.rs:119-123 | basic_system/src/system_functions/bn254_pairing_check.rs:131-133 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart. 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, `basic_system/src/system_functions/bn254_pairing_check.rs:123` calls `map_err` and `basic_system/src/system_functions/bn254_pairing_check.rs:133` does not — after which the two agree again for 5 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.
D4 · Code Duplication · Duplicated block (2–5 lines × 5) · ×1
  • Duplicated block (2–5 lines × 5) basic_system/src/system_functions/bn254_ecadd.rs:90 — basic_system/src/system_functions/bn254_ecadd.rs:90-92 | basic_system/src/system_functions/bn254_ecmul.rs:89-90 | basic_system/src/system_functions/bn254_pairing_check.rs:105-106 | basic_system/src/system_functions/bn254_pairing_check.rs:125-129 | basic_system/src/system_functions/bn254_pairing_check.rs:134-138 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `basic_system/src/system_functions/bn254_pairing_check.rs:125` 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.
D4 · Code Duplication · Duplicated block (60 lines × 2) · ×1
  • Duplicated block (60 lines × 2) basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:284 — basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs:284-343 | basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs:231-290 — `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7002_withdrawal_contract/mod.rs` and `basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 96 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:156 — basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:156-166 | zk_ee/src/common_structs/proof_data.rs:35-44 | zk_ee/src/storage_types/mod.rs:97-107 — 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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378 — basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378-391 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:424-440 | basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:640-656 — 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 `basic_system/src/system_implementation/ethereum_storage_model/persist_changes.rs:378` 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.
D5 · Coupling · Unstable project callable_oracles · ×1
  • Unstable project callable_oracles — callable_oracles has instability 0.83 with 1 dependents.
D5 · Coupling · Unstable project forward_system · ×1
  • Unstable project forward_system — forward_system has instability 0.90 with 1 dependents.
X18 · Disposal-pattern correctness · Explicit release owed and not made on every path · ×1
  • Explicit release owed and not made on every path forward_system/src/system/logger.rs:21 — `handle` (line 21) is a `BufWriter` this function owns and never releases: no `flush()` (or `into_inner()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a buffered writer that is dropped flushes and throws the error away, so a failed write reports success. Release it where the work ends.
X25 · Inert configuration knob · Configuration option is read nowhere · ×1
  • Configuration option is read nowhere basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:905 — `DeProxy._marker` 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.
Minor — 218 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×169
  • Orphaned file basic_system/src/system_implementation/flat_storage_model/simple_growable_storage.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file basic_system/src/system_functions/modexp/delegation/bigint.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/secp256k1/field/field_10x26.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/ark_ff_delegation/fp/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file basic_system/src/system_implementation/flat_storage_model/account_cache_entry.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file evm_interpreter/src/ee_trait_impl.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file evm_interpreter/src/interpreter.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file basic_system/src/system_functions/point_evaluation.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/secp256k1/field/field_5x52.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/ark_ff_delegation/biginteger/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file forward_system/src/system/tracers/call_tracer.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file zk_ee/src/common_structs/history_map/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file zk_ee/src/common_structs/logs_storage.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file zk_ee/src/system/errors/context/tests.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/secp256k1/recover.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file forward_system/src/run/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/bls12_381/fields/fq.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/secp256k1/points/jacobian.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/ark_ff_delegation/fp/montgomery_backend.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file evm_interpreter/src/instructions/host.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file evm_interpreter/src/evm_stack.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file supporting_crates/u256/src/lib.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file supporting_crates/solidity_abi_derive/src/solidity_codable_derive.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file forward_system/src/system/tracers/evm_opcodes_logger.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crypto/src/secp256k1/field/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 144 more in this group — see findings.md.
P10 · Library API & versioning · Implementation type on the public API · ×17
  • Implementation type on the public API basic_system/src/system_functions/bn254_ecadd.rs:17 — 1 public type in `basic_system.system_functions.bn254_ecadd` is marked as implementation by its own namespace, folder or name: `Bn254AddImpl` (basic_system/src/system_functions/bn254_ecadd.rs:17, 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 basic_system/src/system_functions/bn254_ecmul.rs:18 — 1 public type in `basic_system.system_functions.bn254_ecmul` is marked as implementation by its own namespace, folder or name: `Bn254MulImpl` (basic_system/src/system_functions/bn254_ecmul.rs:18, 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 basic_system/src/system_functions/bn254_pairing_check.rs:21 — 1 public type in `basic_system.system_functions.bn254_pairing_check` is marked as implementation by its own namespace, folder or name: `Bn254PairingCheckImpl` (basic_system/src/system_functions/bn254_pairing_check.rs:21, 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 basic_system/src/system_functions/ecrecover.rs:12 — 1 public type in `basic_system.system_functions.ecrecover` is marked as implementation by its own namespace, folder or name: `EcRecoverImpl` (basic_system/src/system_functions/ecrecover.rs:12, 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 basic_system/src/system_functions/keccak256.rs:15 — 1 public type in `basic_system.system_functions.keccak256` is marked as implementation by its own namespace, folder or name: `Keccak256Impl` (basic_system/src/system_functions/keccak256.rs:15, 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 basic_system/src/system_functions/modexp/mod.rs:48 — 1 public type in `basic_system.system_functions.modexp` is marked as implementation by its own namespace, folder or name: `ModExpImpl` (basic_system/src/system_functions/modexp/mod.rs:48, 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 basic_system/src/system_functions/p256_verify.rs:16 — 1 public type in `basic_system.system_functions.p256_verify` is marked as implementation by its own namespace, folder or name: `P256VerifyImpl` (basic_system/src/system_functions/p256_verify.rs:16, 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 basic_system/src/system_functions/point_evaluation.rs:12 — 1 public type in `basic_system.system_functions.point_evaluation` is marked as implementation by its own namespace, folder or name: `PointEvaluationImpl` (basic_system/src/system_functions/point_evaluation.rs:12, 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 basic_system/src/system_functions/ripemd160.rs:16 — 1 public type in `basic_system.system_functions.ripemd160` is marked as implementation by its own namespace, folder or name: `RipeMd160Impl` (basic_system/src/system_functions/ripemd160.rs:16, 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 basic_system/src/system_functions/sha256.rs:14 — 1 public type in `basic_system.system_functions.sha256` is marked as implementation by its own namespace, folder or name: `Sha256Impl` (basic_system/src/system_functions/sha256.rs:14, 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 proof_running_system/src/io_oracle/mod.rs:41 — 1 public type in `proof_running_system.io_oracle` is marked as implementation by its own namespace, folder or name: `DummyCSRImpl` (proof_running_system/src/io_oracle/mod.rs:41, 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 supporting_crates/solidity_abi/src/impls/byte_ref.rs:7 — 4 public types in `solidity_abi.impls.byte_ref` are marked as implementation by their own namespace, folder or name: `Bytes` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:7, `impls`), `BytesOwned` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:14, `impls`), `BytesRef` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:47, `impls`), `BytesRefMut` (supporting_crates/solidity_abi/src/impls/byte_ref.rs:51, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API supporting_crates/solidity_abi/src/impls/codable_array.rs:6 — 3 public types in `solidity_abi.impls.codable_array` are marked as implementation by their own namespace, folder or name: `Array` (supporting_crates/solidity_abi/src/impls/codable_array.rs:6, `impls`), `ArrayRef` (supporting_crates/solidity_abi/src/impls/codable_array.rs:82, `impls`), `ArrayRefMut` (supporting_crates/solidity_abi/src/impls/codable_array.rs:87, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API supporting_crates/solidity_abi/src/impls/codable_slice.rs:7 — 3 public types in `solidity_abi.impls.codable_slice` are marked as implementation by their own namespace, folder or name: `Slice` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:7, `impls`), `SliceRef` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:90, `impls`), `SliceRefMut` (supporting_crates/solidity_abi/src/impls/codable_slice.rs:96, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API supporting_crates/solidity_abi/src/impls/string_ref.rs:6 — 3 public types in `solidity_abi.impls.string_ref` are marked as implementation by their own namespace, folder or name: `SolidityString` (supporting_crates/solidity_abi/src/impls/string_ref.rs:6, `impls`), `SolidityStringRef` (supporting_crates/solidity_abi/src/impls/string_ref.rs:26, `impls`), `SolidityStringRefMut` (supporting_crates/solidity_abi/src/impls/string_ref.rs:30, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API supporting_crates/solidity_abi/src/impls/uint_x.rs:114 — 9 public types in `solidity_abi.impls.uint_x` are marked as implementation by their own namespace, folder or name: `U256Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:114, `impls`), `U256RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:114, `impls`), `U160Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:115, `impls`), `U160RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:115, `impls`), `U128Ref` (supporting_crates/solidity_abi/src/impls/uint_x.rs:116, `impls`), `U128RefMut` (supporting_crates/solidity_abi/src/impls/uint_x.rs:116, `impls`), `Address` (supporting_crates/solidity_abi/src/impls/uint_x.rs:119, `impls`), `AddressRef` (supporting_crates/solidity_abi/src/impls/uint_x.rs:131, `impls`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API zk_ee/src/system/errors/internal.rs:13 — 1 public type in `zk_ee.system.errors.internal` is marked as implementation by its own namespace, folder or name: `InternalError` (zk_ee/src/system/errors/internal.rs:13, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
X10 · Duplicated predicate · Duplicated predicate · ×8
  • Duplicated predicate crypto/src/secp256k1/field/mod_inv32.rs:286 — `(f == Self::ONE || f == -Self::ONE) || (*self == Self::ZERO && d == Self::ZERO && (f == mod_info.modulus || f == -mod_info.modulus))` appears character-identically in 2 files — crypto/src/secp256k1/field/mod_inv32.rs, crypto/src/secp256k1/field/mod_inv64.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 crypto/src/secp256k1/field/mod_inv32.rs:216 — `d_out > -mod_info.modulus * 2 && d_out < mod_info.modulus` appears character-identically in 2 files — crypto/src/secp256k1/field/mod_inv32.rs, crypto/src/secp256k1/field/mod_inv64.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 crypto/src/secp256k1/field/mod_inv32.rs:217 — `e_out > -mod_info.modulus * 2 && e_out < mod_info.modulus` appears character-identically in 2 files — crypto/src/secp256k1/field/mod_inv32.rs, crypto/src/secp256k1/field/mod_inv64.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 supporting_crates/u256/src/risc_v/mod.rs:370 — `limbs[3] != 0 || limbs[2] != 0 || limbs[1] != 0` appears character-identically in 2 files — supporting_crates/u256/src/risc_v/mod.rs, zk_ee/src/utils/integer_utils.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 basic_bootloader/src/bootloader/block_flow/ethereum/eip_2935_historical_block_hash/mod.rs:44 — `props.nonce.0 == 1 && props.observable_bytecode_len.0 > 0` appears character-identically in 3 files — basic_bootloader/src/bootloader/block_flow/ethereum/eip_2935_historical_block_hash/mod.rs, basic_bootloader/src/bootloader/block_flow/ethereum/eip_4788_historical_beacon_root/mod.rs, basic_bootloader/src/bootloader/block_flow/ethereum/eip_7251_consolidation_contract/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 basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs:874 — `self.root.is_empty() || self.root.is_opaque_nontrivial_root()` appears character-identically in 2 files — basic_system/src/system_implementation/ethereum_storage_model/mpt/trie.rs, basic_system/src/system_implementation/ethereum_storage_model/mpt/updates/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 crypto/src/secp256k1/points/affine.rs:78 — `self.x == other.x && self.y == other.y && self.infinity == other.infinity` appears character-identically in 2 files — crypto/src/secp256k1/points/affine.rs, crypto/src/secp256r1/points/affine.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 crypto/src/bls12_381/curves/g1.rs:127 — `validate == ark_serialize::Validate::Yes && !p.is_in_correct_subgroup_assuming_on_curve()` appears character-identically in 2 files — crypto/src/bls12_381/curves/g1.rs, crypto/src/bls12_381/curves/g2.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.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×4
  • Projects may be oversized for their cohesion basic_bootloader/Cargo.toml:1 — `basic_bootloader` (54251 LoC, 159 module-visible types across 23 directories) overshoots its size bounds. 4 of 25 build unit(s) (Cargo) overshoot their size bounds, lowering Project Cohesion to 6.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.
  • Projects may be oversized for their cohesion crypto/Cargo.toml:1 — `crypto` (27469 LoC, 76 module-visible types across 17 directories) overshoots its size bounds. 4 of 25 build unit(s) (Cargo) overshoot their size bounds, lowering Project Cohesion to 6.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.
  • Projects may be oversized for their cohesion basic_system/Cargo.toml:1 — `basic_system` (15941 LoC, 114 module-visible types across 12 directories) overshoots its size bounds. 4 of 25 build unit(s) (Cargo) overshoot their size bounds, lowering Project Cohesion to 6.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.
  • Projects may be oversized for their cohesion zk_ee/Cargo.toml:1 — `zk_ee` (10699 LoC, 201 module-visible types across 22 directories) overshoots its size bounds. 4 of 25 build unit(s) (Cargo) overshoot their size bounds, lowering Project Cohesion to 6.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.
D30 · Dependency Vulnerabilities · Low vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file basic_bootloader/src/bootloader/block_flow/zk/post_tx_op/da_commitment_generator/blob_commitment_generator/brp_roots_of_unity.rs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file crypto/src/bls12_381/consts.rs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file supporting_crates/nostd_compression/src/deflate/core.rs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no build, run or usage example zksync_os/README.md:1 — `zksync_os` is a binary crate (`src/main.rs`) and neither `zksync_os/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example zksync_os_runner/README.md:1 — `zksync_os_runner` is a published crate (`[package]` without `publish = false`) and neither `zksync_os_runner/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: basic_bootloader/src/bootloader/transaction/rlp_encoded/rlp/minimal_rlp_parser.rs, basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/eip_7702_tx.rs, api/src/helpers.rs, basic_bootloader/src/bootloader/constants.rs, zk_ee/src/system/metadata/zk_metadata.rs. Pair on, review, or document these before any departure.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found zksync_os/src/main.rs:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `zksync_os/src/main.rs` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx` · ×1
  • `LegacyTXInner` spells `TX` where 21 names in the project spell it `Tx` basic_bootloader/src/bootloader/transaction/rlp_encoded/transaction_types/legacy_tx.rs:17 — 21 of 22 names in project basic_bootloader spell the token `Tx` (21 of 22; unit: names in project basic_bootloader containing `Tx`). Peers: basic_bootloader.bootloader.block_flow.post_tx_loop_op.PostTxLoopOp (basic_bootloader/src/bootloader/block_flow/post_tx_loop_op.rs:8); basic_bootloader.bootloader.block_flow.pre_tx_loop_op.PreTxLoopOp (basic_bootloader/src/bootloader/block_flow/pre_tx_loop_op.rs:5); basic_bootloader.bootloader.block_flow.zk.block_data.NopTxHashesAccumulator (basic_bootloader/src/bootloader/block_flow/zk/block_data.rs:52); basic_bootloader.bootloader.block_flow.zk.block_data.UpgradeTx (basic_bootloader/src/bootloader/block_flow/zk/block_data.rs:141); basic_bootloader.bootloader.block_flow.zk.ZKHeaderStructurePreTxOp (basic_bootloader/src/bootloader/block_flow/zk/mod.rs:21). Rename to `LegacyTxInner`. [rule N6]
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 172 of 304 significant files have no living knowledge, while the repository is still being changed at a low rate (1 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 172 separate risks. Counted over 304 of the 497 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `circuit_test_program`, `crypto/src/blake2s/test_program`, `zksync_os`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation tests/contracts_sol/bench/package.json:12 — `tests/contracts_sol/bench/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate .github/workflows/release-binaries.yml:95 — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
P6 · Release Hygiene · No changelog · ×1
  • 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.)

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-aafc5929c0e542029ef9446d0379d221/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=457" --report-format json --report-path /tmp/watchdog-gitleaks-aafc5929c0e542029ef9446d0379d221/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=657 --max-count=191" --report-format json --report-path /tmp/watchdog-gitleaks-aafc5929c0e542029ef9446d0379d221/history-2.json --exit-code 0 --source .29artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-aafc5929c0e542029ef9446d0379d221/tree.json --exit-code 0 --source .29artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude basic_system/target .64artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .7artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e887-9cb4-7b31-b708-3743268b74a1 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md