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

chore: Kl/merge-protocol-defense #1001

Closed
wants to merge 8 commits into from

Conversation

kelemeno
Copy link
Contributor

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.

koloz193 and others added 7 commits September 27, 2024 12:21
Signed-off-by: Danil <[email protected]>
Co-authored-by: Bence Haromi <[email protected]>
Co-authored-by: Grzegorz Prusak <[email protected]>
Co-authored-by: Moshe Shababo <[email protected]>
Co-authored-by: Akosh Farkash <[email protected]>
Co-authored-by: Bruno França <[email protected]>
Co-authored-by: Vlad Bochok <[email protected]>
Co-authored-by: Roman Brodetski <[email protected]>
Co-authored-by: vladbochok <[email protected]>
Co-authored-by: Stanislav Bezkorovainyi <[email protected]>
Co-authored-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Co-authored-by: otani <[email protected]>
Co-authored-by: Zach Kolodny <[email protected]>
Copy link

github-actions bot commented Oct 25, 2024

Changes to gas cost

Generated at commit: d57c55365aa991b907805bbfb9b4d9f2f2773d7b, compared to commit: f33bcb79ffee6e065b210a22e69829b6271dbd6c

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter createNewChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setCTM
setPendingAdmin
setZKChain
+2,686 ❌
-992 ✅
+146 ❌
+9 ❌
-1 ✅
0 ➖
-1 ✅
+2.55%
-0.84%
+0.10%
+0.01%
-0.00%
0.00%
-0.00%
ChainAdmin setUpgradeTimestamp +179 ❌ +0.40%
DiamondProxy finalizeEthWithdrawal
requestL2Transaction
-117 ✅
+3 ❌
-0.15%
+0.00%
TransparentUpgradeableProxy allowAdminImplementation
setAllowedData
+23 ❌
-11 ✅
+0.04%
-0.02%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) -1 ✅ -0.03%
TestnetERC20Token transfer -5 ✅ -0.01%
DummyChainTypeManagerWBH setZKChain +2 ❌ +0.00%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,347,343 (0) addChainTypeManager
admin
createNewChain
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setCTM
setPendingAdmin
setZKChain
23,895 (0)
435 (0)
31,665 (+2,980)
0 (0)
0 (0)
0 (0)
23,832 (0)
33,029 (-3)
31,023 (0)
24,336 (-12)
44,232 (0)
25,999 (-12)
111,339 (0)
0.00%
0.00%
+10.39%
+∞%
+∞%
+∞%
0.00%
-0.01%
0.00%
-0.05%
0.00%
-0.05%
0.00%
44,146 (-2)
1,435 (-111)
108,142 (+2,686)
1,403 (+15)
1,518 (0)
1,581 (+1)
25,461 (+4)
117,286 (-992)
151,484 (+146)
66,070 (+9)
44,269 (-1)
47,720 (0)
111,376 (-1)
-0.00%
-7.18%
+2.55%
+1.08%
0.00%
+0.06%
+0.02%
-0.84%
+0.10%
+0.01%
-0.00%
0.00%
-0.00%
47,621 (0)
1,435 (-1,000)
36,509 (+12)
985 (0)
1,103 (-6)
1,191 (-3)
25,832 (0)
95,754 (-506)
59,257 (+12,027)
71,205 (0)
44,280 (-12)
49,885 (0)
111,387 (-12)
0.00%
-41.07%
+0.03%
0.00%
-0.54%
-0.25%
0.00%
-0.53%
+25.46%
0.00%
-0.03%
0.00%
-0.01%
47,621 (0)
2,435 (0)
878,037 (+4,736)
3,625 (-14)
3,873 (0)
4,069 (0)
26,244 (0)
298,307 (+1,448)
434,350 (-36)
91,345 (0)
44,292 (0)
49,897 (0)
111,399 (0)
0.00%
0.00%
+0.54%
-0.38%
0.00%
0.00%
0.00%
+0.49%
-0.01%
0.00%
0.00%
0.00%
0.00%
6,656 (0)
2,560 (+256)
2,560 (0)
512 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,535 (-1)
3,328 (0)
2,816 (0)
4,864 (0)
2,816 (0)
ChainAdmin 835,004 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,247 (+179) +0.40% 45,369 (+60) +0.13% 45,645 (0) 0.00% 256 (0)
MailboxFacet 2,681,325 (0) finalizeEthWithdrawal 8,251 (0) 0.00% 52,315 (-123) -0.23% 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,637 (-117)
131,441 (+3)
33,777 (-5)
-0.15%
+0.00%
-0.01%
80,003 (+48)
170,048 (+24)
33,756 (0)
+0.06%
+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)
TransparentUpgradeableProxy 644,375 (0) allowAdminImplementation
registerToken
setAllowedData
setSelectorIsValidated
54,663 (-12)
28,945 (0)
55,427 (0)
54,716 (0)
-0.02%
0.00%
0.00%
0.00%
54,916 (+23)
150,544 (+1)
56,481 (-11)
54,745 (+1)
+0.04%
+0.00%
-0.02%
+0.00%
55,035 (0)
151,002 (0)
56,096 (+48)
54,764 (0)
0.00%
0.00%
+0.09%
0.00%
55,035 (0)
158,133 (0)
58,247 (0)
54,764 (0)
0.00%
0.00%
0.00%
0.00%
258 (0)
881 (0)
257 (0)
258 (0)
MerkleTest 436,733 (0) calculateRoot(bytes32[],uint256,bytes32) 571 (0) 0.00% 2,930 (-1) -0.03% 2,982 (0) 0.00% 3,026 (-11) -0.36% 265 (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,514 (+11)
45,729 (-3)
45,240 (+3)
+0.02%
-0.01%
+0.01%
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)
TestnetERC20Token 640,427 (0) approve
mint
transfer
24,272 (0)
34,031 (0)
46,377 (0)
0.00%
0.00%
0.00%
46,256 (+4)
61,796 (+3)
46,723 (-5)
+0.01%
+0.00%
-0.01%
46,220 (0)
68,255 (0)
46,653 (-24)
0.00%
0.00%
-0.05%
46,568 (0)
68,615 (0)
46,977 (0)
0.00%
0.00%
0.00%
1,527 (0)
1,704 (0)
257 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,739 (+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,140 (+2) +0.00% 44,161 (+12) +0.03% 44,161 (0) 0.00% 256 (0)
TestPermanentRestriction 1,423,411 (0) setAllowedData 26,818 (0) 0.00% 27,264 (-1) -0.00% 27,089 (0) 0.00% 27,902 (0) 0.00% 257 (0)
L1NativeTokenVault 3,442,372 (0) bridgeBurn 12,777 (0) 0.00% 89,726 (+3) +0.00% 105,981 (0) 0.00% 105,981 (0) 0.00% 1,299 (0)

@kelemeno
Copy link
Contributor Author

Closing, as we don't want to switch to foundry now, and merging will just cause merge issues in the future

@kelemeno kelemeno closed this Oct 26, 2024
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.

3 participants