Skip to content

fix(l2cm): address audit small fixes#20007

Open
0xniha wants to merge 11 commits intodevelopfrom
fix/l2cm-audit-small-fixes
Open

fix(l2cm): address audit small fixes#20007
0xniha wants to merge 11 commits intodevelopfrom
fix/l2cm-audit-small-fixes

Conversation

@0xniha
Copy link
Copy Markdown
Contributor

@0xniha 0xniha commented Apr 9, 2026

Fixes L2CM audit small findings:

  • #29 Move NATIVE_ASSET_LIQUIDITY upgrade down to the non-initializable pre-deploy section: 2c53245.
  • #5 Top-level V2 deploy wrapper zeroes the initial PERMISSIONED_CANNON bond: 63e6367.
  • #7 Missing code checks can leave new L2 predeploys pointing at empty implementations: 22aae93.
  • #17 L2Genesis accepts mismatched interop inputs: d9198a5.
  • #13 NUT bundle version is never enforced: 12d045f.
  • #19 Fork suite never revalidates post-upgrade L1Block feature state: a15b456.

Pending:

  • #15 CGT upgrades cannot replay a renounced LiquidityController owner

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.9%. Comparing base (9d68e89) to head (c9f1834).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...es/contracts-bedrock/src/L2/L2ContractsManager.sol 0.0% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20007      +/-   ##
===========================================
+ Coverage     11.7%    77.9%   +66.2%     
===========================================
  Files          677      139     -538     
  Lines        71141     6850   -64291     
===========================================
- Hits          8328     5338    -2990     
+ Misses       62669     1512   -61157     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 77.9% <75.0%> (+<0.1%) ⬆️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...-bedrock/src/libraries/L2ContractsManagerUtils.sol 63.4% <100.0%> (+5.5%) ⬆️
...racts-bedrock/src/libraries/NetworkUpgradeTxns.sol 100.0% <100.0%> (ø)
...es/contracts-bedrock/src/L2/L2ContractsManager.sol 0.0% <0.0%> (ø)

... and 538 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@0xOneTony 0xOneTony marked this pull request as ready for review April 10, 2026 12:39
@0xOneTony 0xOneTony requested review from a team and wwared April 10, 2026 12:39
@0xOneTony 0xOneTony requested a review from a team as a code owner April 10, 2026 12:39
@0xOneTony 0xOneTony requested a review from einar-oplabs April 10, 2026 12:39
// predeploys that are being introduced on this particular upgrade.
address implementation = L2ProxyAdmin(Predeploys.PROXY_ADMIN).getProxyImplementation(_proxy);

if (_implementation.code.length == 0) revert L2ContractsManager_EmptyImplementation(_implementation);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The location of this check is just slightly awkward. I would move it closer to the top of this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants