Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ZKChain Upgrades and Libraries Diff Audit #1021

Merged
merged 41 commits into from
Oct 27, 2024

Conversation

Raid5594
Copy link
Collaborator

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

vladbochok and others added 29 commits October 25, 2024 13:22
Copy link

github-actions bot commented Oct 27, 2024

Changes to gas cost

Generated at commit: e9ee8b466d208b5043a7d98c885bdbd716d1b804, compared to commit: 21ac0837db95eccaaa913ce4b93085ea58650204

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter addChainTypeManager
createNewChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
+2 ❌
-662 ✅
-200 ✅
+159 ❌
+0.00%
-0.61%
-0.17%
+0.11%
DiamondProxy finalizeEthWithdrawal
requestL2Transaction
+118 ❌
-2 ✅
+0.15%
-0.00%
ChainAdmin setUpgradeTimestamp +58 ❌ +0.13%
TransparentUpgradeableProxy setAllowedAdminImplementation
setAllowedData
+45 ❌
-57 ✅
+0.08%
-0.10%
TestnetERC20Token approve 0 ➖ 0.00%
DummyChainTypeManagerWBH setZKChain -1 ✅ -0.00%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,347,355 (0) addChainTypeManager
createNewChain
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
23,895 (-12)
28,745 (+132)
0 (0)
0 (0)
0 (0)
23,854 (0)
33,041 (+21)
31,023 (-12)
24,370 (0)
-0.05%
+0.46%
+∞%
+∞%
+∞%
0.00%
+0.06%
-0.04%
0.00%
44,149 (+2)
107,066 (-662)
1,383 (0)
1,516 (+24)
1,579 (-4)
25,493 (+7)
119,205 (-200)
151,541 (+159)
66,082 (-7)
+0.00%
-0.61%
0.00%
+1.61%
-0.25%
+0.03%
-0.17%
+0.11%
-0.01%
47,621 (0)
36,503 (-6)
988 (+3)
1,100 (0)
1,191 (0)
25,854 (0)
97,846 (+1,070)
58,957 (+12,032)
71,227 (0)
0.00%
-0.02%
+0.30%
0.00%
0.00%
0.00%
+1.11%
+25.64%
0.00%
47,621 (0)
871,795 (+4,003)
3,625 (-7)
3,873 (0)
4,055 (0)
26,266 (0)
300,142 (+2,019)
434,742 (0)
91,367 (0)
0.00%
+0.46%
-0.19%
0.00%
0.00%
0.00%
+0.68%
0.00%
0.00%
6,656 (0)
2,560 (0)
512 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,535 (-1)
3,328 (0)
MailboxFacet 2,681,325 (0) finalizeEthWithdrawal 8,251 (0) 0.00% 52,438 (+123) +0.24% 52,735 (0) 0.00% 52,735 (0) 0.00% 257 (0)
DiamondProxy 2,405,277 (0) finalizeEthWithdrawal
requestL2Transaction
util_setChainId
37,779 (0)
33,295 (0)
28,944 (0)
0.00%
0.00%
0.00%
79,746 (+118)
131,438 (-2)
33,777 (-8)
+0.15%
-0.00%
-0.02%
79,955 (-24)
170,024 (-12)
33,756 (0)
-0.03%
-0.01%
0.00%
80,291 (0)
191,977 (0)
34,128 (0)
0.00%
0.00%
0.00%
257 (0)
771 (0)
519 (0)
ChainAdmin 835,016 (0) setUpgradeTimestamp 45,273 (+19,912) +78.51% 45,381 (+58) +0.13% 45,309 (-36) -0.08% 45,645 (0) 0.00% 256 (0)
TransparentUpgradeableProxy 644,397 (-204,028) setAllowedAdminImplementation
setAllowedData
setSelectorShouldBeValidated
54,675 (0)
55,405 (0)
54,726 (0)
0.00%
0.00%
0.00%
54,934 (+45)
56,436 (-57)
54,754 (-3)
+0.08%
-0.10%
-0.01%
55,047 (+12)
56,074 (0)
54,774 (0)
+0.02%
0.00%
0.00%
55,047 (0)
58,225 (+12)
54,774 (0)
0.00%
+0.02%
0.00%
258 (0)
257 (0)
258 (0)
TestPermanentRestriction 1,450,178 (0) setAllowedData 26,796 (0) 0.00% 27,228 (-21) -0.08% 27,067 (0) 0.00% 27,880 (0) 0.00% 257 (0)
MerkleTest 436,733 (0) calculateRoot(bytes32[],uint256,bytes32) 571 (0) 0.00% 2,931 (+2) +0.07% 2,982 (0) 0.00% 3,037 (0) 0.00% 265 (0)
L1NativeTokenVault 3,438,536 (0) bridgeBurn 12,799 (0) 0.00% 89,782 (+23) +0.03% 106,025 (0) 0.00% 106,025 (0) 0.00% 1,299 (0)
TestnetERC20Token 640,427 (0) approve
transfer
24,272 (0)
46,377 (0)
0.00%
0.00%
46,260 (0)
46,734 (+6)
0.00%
+0.01%
46,220 (-12)
46,677 (0)
-0.03%
0.00%
46,568 (0)
46,977 (0)
0.00%
0.00%
1,527 (0)
257 (0)
AccessControlRestriction 1,357,213 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,277 (0)
24,360 (0)
24,219 (0)
0.00%
0.00%
0.00%
51,517 (+4)
45,730 (-5)
45,247 (-2)
+0.01%
-0.01%
-0.00%
51,649 (0)
49,094 (0)
48,444 (0)
0.00%
0.00%
0.00%
51,649 (0)
54,114 (0)
53,925 (0)
0.00%
0.00%
0.00%
1,024 (0)
1,536 (0)
1,536 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,738 (-2) -0.01% 33,193 (0) 0.00% 33,215 (0) 0.00% 277 (0)
DummyChainTypeManagerWBH 3,816,972 (0) setZKChain 44,101 (0) 0.00% 44,138 (-1) -0.00% 44,149 (-6) -0.01% 44,161 (0) 0.00% 256 (0)
BridgedStandardERC20 2,119,776 (+12)
L2SharedBridgeLegacy 3,252,432 (-1,490)
DummyChainTypeManager 3,815,224 (+12)
TestBaseFacet 149,591 (-24)

@StanislavBreadless StanislavBreadless merged commit bc4674b into kl/sync-layer-reorg Oct 27, 2024
23 checks passed
@StanislavBreadless StanislavBreadless deleted the ra/fix-oz-library branch October 27, 2024 14:33
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