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): comment out unit tests and fix, small bug in shared bridge #812

Merged

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.

@Raid5594 Raid5594 force-pushed the ra/fix-commented-unit-tests-sync-layer-reorg branch from f257f04 to bb6d780 Compare September 18, 2024 11:54
Copy link

github-actions bot commented Sep 18, 2024

Changes to gas cost

Generated at commit: 6ae6abaefda0d5b35e2b62b0e2f40309256a12b8, compared to commit: 3b51ccfdcb05be0406e7a1921361383abcb2a534

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
TransparentUpgradeableProxy bridgeRecoverFailedTransfer
bridgehubDeposit
bridgehubDepositBaseToken
claimFailedDeposit
createNewChain
depositLegacyErc20Bridge
finalizeDeposit
finalizeWithdrawal
originChainId
setChainCreationParams
setNewVersionUpgrade
setUpgradeDiamondCut
transferFundsFromSharedBridge
transferTokenToNTV
-12,500 ✅
-6,460 ✅
-1,952 ✅
-6,250 ✅
+2,159,626 ❌
+30 ❌
-12,500 ✅
-7,792 ✅
+67 ❌
+341 ❌
+750 ❌
+340 ❌
+65 ❌
+3,405 ❌
-12.47%
-6.90%
-2.27%
-6.90%
+3099.48%
+0.02%
-8.90%
-6.68%
+6.30%
+0.36%
+0.37%
+0.35%
+0.13%
+10.96%
AdminFacet freezeDiamond +3,140 ❌ +40.94%
L1NativeTokenVault bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
originChainId
tokenAddress
transferFundsFromSharedBridge
-100 ✅
-10,714 ✅
-11,111 ✅
+67 ❌
+45 ❌
+65 ❌
-0.12%
-26.65%
-36.58%
+14.29%
+2.90%
+0.30%
UtilsFacet util_setZkPorterAvailability -3,317 ✅ -26.43%
L1AssetRouter bridgeRecoverFailedTransfer
bridgehubDeposit
bridgehubDepositBaseToken
depositLegacyErc20Bridge
finalizeDeposit
finalizeWithdrawal
transferFundsToNTV
-11,111 ✅
-6,956 ✅
-2,286 ✅
+30 ❌
-10,714 ✅
-7,981 ✅
-678 ✅
-24.45%
-10.43%
-3.83%
+0.02%
-18.27%
-8.90%
-7.84%
L1Nullifier bridgeRecoverFailedTransfer
claimFailedDeposit
finalizeDeposit
transferTokenToNTV
-12,500 ✅
-6,250 ✅
-8,573 ✅
+37 ❌
-17.23%
-9.42%
-11.01%
+0.40%
Utils constructL2Log
constructRollupL2DAValidatorOutputHash
createCommitBatchInfo
createStoredBatchInfo
defaultPointEvaluationPrecompileInput
encodePacked
getAdminSelectors
getDefaultBlobCommitment
getExecutorSelectors
getGettersSelectors
getMailboxSelectors
getUtilsFacetSelectors
makeInitializeDataForNewChain
randomBytes32
+22 ❌
+10 ❌
+22 ❌
-45 ✅
+22 ❌
+64 ❌
+211 ❌
-45 ✅
+22 ❌
+22 ❌
-44 ✅
+22 ❌
-45 ✅
+33 ❌
+1.91%
+0.73%
+0.53%
-5.13%
+1.33%
+0.46%
+7.78%
-2.70%
+1.82%
+0.35%
-2.43%
+0.27%
-2.20%
+3.09%
DiamondProxy requestL2Transaction
util_setZkPorterAvailability
-4 ✅
-3,319 ✅
-0.00%
-8.10%
ChainTypeManager createNewChain
initialize
setChainCreationParams
setNewVersionUpgrade
setUpgradeDiamondCut
+86,054 ❌
+269 ❌
+159 ❌
+568 ❌
+158 ❌
+2.72%
+0.24%
+0.37%
+0.38%
+0.35%
DummyBridgehubSetter baseToken
createNewChain
getZKChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
+45 ❌
-881 ✅
0 ➖
+331 ❌
-61 ✅
+0.38%
-0.82%
0.00%
+0.35%
-0.04%
Bridgehub createNewChain +25,743 ❌ +0.63%
TestnetERC20Token transfer +7 ❌ +0.02%
PermanentRestriction setAllowedData +70 ❌ +0.14%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) +1 ❌ +0.03%
L1ERC20Bridge deposit(address,address,uint256,uint256,uint256) -2 ✅ -0.00%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
TransparentUpgradeableProxy 787,868 (-199,948) bridgeRecoverFailedTransfer
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance(uint256,address)
chainBalance(uint256,bytes32)
claimFailedDeposit
createNewChain
depositLegacyErc20Bridge
finalizeDeposit
finalizeWithdrawal
getAssetId
originChainId
registerEthToken
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setNewVersionUpgrade
setUpgradeDiamondCut
tokenAddress
transferFundsFromSharedBridge
transferTokenToNTV
45,531 (0)
46,497 (-395)
29,858 (0)
1,336 (0)
1,185 (0)
47,236 (0)
55,686 (+170)
39,720 (0)
124,413 (-7,102)
56,438 (0)
1,284 (0)
1,131 (+67)
100,858 (0)
28,911 (0)
96,346 (+341)
32,952 (0)
32,997 (0)
201,163 (+750)
97,128 (+340)
0 (0)
37,415 (+65)
31,073 (0)
0.00%
-0.84%
0.00%
0.00%
0.00%
0.00%
+0.31%
0.00%
-5.40%
0.00%
0.00%
+6.30%
0.00%
0.00%
+0.36%
0.00%
0.00%
+0.37%
+0.35%
+∞%
+0.17%
0.00%
87,759 (-12,500)
87,114 (-6,460)
84,079 (-1,952)
1,861 (-2)
1,703 (-5)
84,374 (-6,250)
2,229,303 (+2,159,626)
153,437 (+30)
127,964 (-12,500)
108,772 (-7,792)
1,540 (+12)
1,131 (+67)
105,849 (+38)
128,048 (+43)
96,346 (+341)
53,049 (+17)
74,756 (+71)
201,163 (+750)
97,128 (+340)
3,678 (+42)
49,043 (+65)
34,478 (+3,405)
-12.47%
-6.90%
-2.27%
-0.11%
-0.29%
-6.90%
+3099.48%
+0.02%
-8.90%
-6.68%
+0.79%
+6.30%
+0.04%
+0.03%
+0.36%
+0.03%
+0.10%
+0.37%
+0.35%
+1.16%
+0.13%
+10.96%
98,007 (-12,500)
87,322 (-13,462)
81,979 (-6,199)
1,336 (0)
1,185 (0)
92,471 (-3,700)
3,668,891 (+3,599,214)
210,257 (+45)
127,964 (-12,500)
125,598 (-9,502)
1,284 (0)
1,131 (+67)
105,396 (0)
128,480 (0)
96,346 (+341)
53,295 (0)
75,827 (0)
201,163 (+750)
97,128 (+340)
3,135 (+45)
48,898 (+65)
34,478 (+3,405)
-11.31%
-13.36%
-7.03%
0.00%
0.00%
-3.85%
+5165.57%
+0.02%
-8.90%
-7.03%
0.00%
+6.30%
0.00%
0.00%
+0.36%
0.00%
0.00%
+0.37%
+0.35%
+1.46%
+0.13%
+10.96%
109,492 (-25,000)
132,371 (-22)
114,182 (-22)
9,836 (0)
9,685 (0)
102,677 (-17,600)
3,668,891 (+3,585,053)
210,334 (+45)
131,515 (-17,898)
135,110 (-17,834)
7,784 (0)
1,131 (+67)
112,491 (0)
135,575 (0)
96,346 (+341)
53,318 (0)
75,827 (0)
201,163 (+750)
97,128 (+340)
9,635 (+45)
59,675 (+65)
37,883 (+6,810)
-18.59%
-0.02%
-0.02%
0.00%
0.00%
-14.63%
+4276.17%
+0.02%
-11.98%
-11.66%
0.00%
+6.30%
0.00%
0.00%
+0.36%
0.00%
0.00%
+0.37%
+0.35%
+0.47%
+0.11%
+21.92%
4 (0)
12 (+2)
9 (+1)
626 (+40)
718 (+45)
8 (0)
5 (+3)
3 (0)
2 (0)
20 (+1)
533 (+1)
518 (0)
880 (+5)
881 (+5)
1 (0)
158 (+10)
80 (+5)
1 (0)
1 (0)
4,406 (+3)
5 (0)
2 (+1)
AdminFacet 4,598,143 (0) freezeDiamond 2,403 (0) 0.00% 10,809 (+3,140) +40.94% 2,506 (+52) +2.12% 23,367 (0) 0.00% 5 (+1)
L1NativeTokenVault 3,907,770 (+79,237) bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
initialize
originChainId
registerEthToken
registerToken
tokenAddress
transferFundsFromSharedBridge
12,535 (-22)
10,518 (0)
5,239 (0)
23,155 (0)
536 (+67)
72,705 (0)
453 (0)
540 (+45)
8,875 (+65)
-0.18%
0.00%
0.00%
0.00%
+14.29%
0.00%
0.00%
+9.09%
+0.74%
84,622 (-100)
29,493 (-10,714)
19,261 (-11,111)
54,321 (+104)
536 (+67)
77,696 (+38)
98,003 (+40)
1,599 (+45)
21,563 (+65)
-0.12%
-26.65%
-36.58%
+0.19%
+14.29%
+0.05%
+0.04%
+2.90%
+0.30%
99,679 (+23)
31,005 (-3,583)
22,363 (-7,172)
52,593 (0)
536 (+67)
77,243 (0)
99,956 (0)
2,540 (+45)
20,602 (+65)
+0.02%
-10.36%
-24.28%
0.00%
+14.29%
0.00%
0.00%
+1.80%
+0.32%
99,679 (+23)
34,588 (-17,834)
29,535 (-17,937)
72,493 (0)
536 (+67)
84,338 (0)
107,051 (0)
2,540 (+45)
33,280 (+65)
+0.02%
-34.02%
-37.78%
0.00%
+14.29%
0.00%
0.00%
+1.80%
+0.20%
1,299 (+2)
14 (0)
9 (0)
881 (+5)
518 (0)
880 (+5)
1,139 (+5)
4,353 (0)
5 (0)
UtilsFacet 892,132 (+12) util_setZkPorterAvailability 2,602 (0) 0.00% 9,235 (-3,317) -26.43% 2,602 (-9,950) -79.27% 22,502 (0) 0.00% 3 (+1)
L1AssetRouter 4,128,300 (0) bridgeRecoverFailedTransfer
bridgehubDeposit
bridgehubDepositBaseToken
depositLegacyErc20Bridge
finalizeDeposit
finalizeWithdrawal
initialize
setAssetHandlerAddressThisChain
setL1Erc20Bridge
setNativeTokenVault
transferFundsToNTV
16,546 (0)
16,353 (-1,025)
520 (0)
10,088 (0)
25,679 (0)
25,803 (0)
45,226 (0)
7,604 (0)
4,664 (0)
4,697 (0)
1,193 (0)
0.00%
-5.90%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
34,335 (-11,111)
59,761 (-6,956)
57,412 (-2,286)
132,070 (+30)
47,940 (-10,714)
81,708 (-7,981)
72,089 (+23)
39,251 (+14)
24,269 (+33)
66,613 (-115)
7,972 (-678)
-24.45%
-10.43%
-3.83%
+0.02%
-18.27%
-8.90%
+0.03%
+0.04%
+0.14%
-0.17%
-7.84%
36,544 (-7,172)
57,571 (-13,501)
52,648 (-6,197)
193,029 (+45)
49,999 (-3,583)
98,454 (-12,631)
72,434 (0)
29,504 (0)
24,771 (0)
68,735 (0)
7,609 (-2,500)
-16.41%
-19.00%
-10.53%
+0.02%
-6.69%
-11.37%
0.00%
0.00%
0.00%
0.00%
-24.73%
43,716 (-24,328)
112,045 (-22)
89,651 (-22)
193,094 (+45)
53,582 (-17,834)
111,095 (-17,834)
72,434 (0)
49,404 (0)
24,771 (0)
68,735 (0)
31,727 (0)
-35.75%
-0.02%
-0.02%
+0.02%
-24.97%
-13.83%
0.00%
0.00%
0.00%
0.00%
0.00%
9 (0)
12 (+2)
9 (+1)
3 (0)
14 (0)
20 (+1)
79 (+5)
157 (+10)
80 (+5)
848 (+5)
19 (+2)
L1Nullifier 3,325,005 (-12) bridgeRecoverFailedTransfer
chainBalance
claimFailedDeposit
finalizeDeposit
setL1AssetRouter
setL1NativeTokenVault
transferTokenToNTV
14,025 (0)
738 (0)
16,783 (0)
10,015 (0)
24,771 (0)
24,792 (0)
2,542 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
60,055 (-12,500)
1,242 (-1)
60,068 (-6,250)
69,301 (-8,573)
45,501 (-43)
45,518 (-43)
9,385 (+37)
-17.23%
-0.08%
-9.42%
-11.01%
-0.09%
-0.09%
+0.40%
72,697 (-12,500)
738 (0)
68,220 (-3,586)
86,381 (-8,416)
46,203 (0)
46,224 (0)
9,877 (-306)
-14.67%
0.00%
-4.99%
-8.88%
0.00%
0.00%
-3.01%
80,804 (-25,000)
2,738 (0)
84,400 (-17,828)
108,168 (-18,272)
46,203 (0)
46,224 (0)
16,988 (0)
-23.63%
0.00%
-17.44%
-14.45%
0.00%
0.00%
0.00%
4 (0)
626 (+40)
8 (0)
22 (+1)
2,382 (+5)
2,382 (+5)
6 (+1)
Utils 6,150,640 (+112,972) constructL2Log
constructRollupL2DAValidatorOutputHash
createCommitBatchInfo
createStoredBatchInfo
defaultPointEvaluationPrecompileInput
encodePacked
getAdminSelectors
getDefaultBlobCommitment
getExecutorSelectors
getGettersSelectors
getMailboxSelectors
getUtilsFacetSelectors
makeInitializeDataForNewChain
packBatchTimestampAndBlockTimestamp
randomBytes32
1,173 (+22)
1,375 (+11)
4,153 (+22)
832 (-45)
1,678 (+22)
12,498 (+22)
2,923 (+211)
1,623 (-45)
1,228 (+22)
6,312 (+22)
1,770 (-44)
8,191 (+22)
2,005 (-45)
403 (+33)
1,095 (+33)
+1.91%
+0.81%
+0.53%
-5.13%
+1.33%
+0.18%
+7.78%
-2.70%
+1.82%
+0.35%
-2.43%
+0.27%
-2.20%
+8.92%
+3.11%
1,173 (+22)
1,388 (+10)
4,153 (+22)
832 (-45)
1,678 (+22)
14,053 (+64)
2,923 (+211)
1,623 (-45)
1,228 (+22)
6,312 (+22)
1,770 (-44)
8,191 (+22)
2,005 (-45)
403 (+33)
1,100 (+33)
+1.91%
+0.73%
+0.53%
-5.13%
+1.33%
+0.46%
+7.78%
-2.70%
+1.82%
+0.35%
-2.43%
+0.27%
-2.20%
+8.92%
+3.09%
1,173 (+22)
1,375 (+11)
4,153 (+22)
832 (-45)
1,678 (+22)
14,136 (+22)
2,923 (+211)
1,623 (-45)
1,228 (+22)
6,312 (+22)
1,770 (-44)
8,191 (+22)
2,005 (-45)
403 (+33)
1,095 (+33)
+1.91%
+0.81%
+0.53%
-5.13%
+1.33%
+0.16%
+7.78%
-2.70%
+1.82%
+0.35%
-2.43%
+0.27%
-2.20%
+8.92%
+3.11%
1,173 (+22)
1,533 (+11)
4,153 (+22)
832 (-45)
1,678 (+22)
16,764 (+2,650)
2,923 (+211)
1,623 (-45)
1,228 (+22)
6,312 (+22)
1,770 (-44)
8,191 (+22)
2,005 (-45)
403 (+33)
1,177 (+33)
+1.91%
+0.72%
+0.53%
-5.13%
+1.33%
+18.78%
+7.78%
-2.70%
+1.82%
+0.35%
-2.43%
+0.27%
-2.20%
+8.92%
+2.88%
38 (+1)
34 (+1)
6 (0)
13 (0)
30 (+1)
73 (+3)
28 (+3)
30 (+1)
28 (+3)
59 (+3)
36 (0)
103 (+4)
54 (+6)
18 (+1)
566 (+6)
DiamondProxy 2,475,597 (0) commitBatchesSharedBridge
executeUpgrade
finalizeEthWithdrawal
getAdmin
requestL2Transaction
util_setChainId
util_setZkPorterAvailability
0 (0)
31,709 (0)
37,590 (0)
1,128 (0)
33,146 (0)
28,906 (0)
31,029 (0)
+∞%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
38,158 (-908)
286,696 (+2)
76,484 (+115)
4,809 (-369)
128,875 (-4)
33,758 (+17)
37,666 (-3,319)
-2.32%
+0.00%
+0.15%
-7.13%
-0.00%
+0.05%
-8.10%
64,570 (-984)
432,481 (0)
76,707 (0)
5,128 (0)
166,284 (-48)
33,718 (0)
31,029 (-9,956)
-1.50%
0.00%
0.00%
0.00%
-0.03%
0.00%
-24.29%
91,803 (0)
432,531 (0)
77,007 (0)
9,628 (0)
188,247 (0)
34,090 (0)
50,941 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
43 (+1)
5 (0)
257 (0)
11 (+1)
771 (0)
519 (0)
3 (+1)
GettersFacet 1,152,461 (0) getAdmin 396 (0) 0.00% 2,032 (-164) -7.47% 2,396 (0) 0.00% 2,396 (0) 0.00% 11 (+1)
ChainTypeManager 4,547,000 (0) createNewChain
initialize
setChainCreationParams
setNewVersionUpgrade
setUpgradeDiamondCut
1,053 (0)
22,745 (0)
43,005 (+159)
148,372 (+568)
44,678 (+158)
0.00%
0.00%
+0.37%
+0.38%
+0.35%
3,254,191 (+86,054)
113,369 (+269)
43,005 (+159)
148,372 (+568)
44,678 (+158)
+2.72%
+0.24%
+0.37%
+0.38%
+0.35%
3,614,070 (+25,543)
22,745 (0)
43,005 (+159)
148,372 (+568)
44,678 (+158)
+0.71%
0.00%
+0.37%
+0.38%
+0.35%
3,614,070 (+25,543)
207,230 (+159)
43,005 (+159)
148,372 (+568)
44,678 (+158)
+0.71%
+0.08%
+0.37%
+0.38%
+0.35%
20 (+3)
57 (+6)
1 (0)
1 (0)
1 (0)
DummyBridgehubSetter 5,364,532 (0) addChainTypeManager
admin
baseToken
createNewChain
getZKChain
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setPendingAdmin
23,865 (0)
411 (0)
3,233 (+45)
28,523 (-444)
758 (0)
0 (0)
0 (0)
0 (0)
23,802 (0)
32,938 (0)
30,863 (0)
24,282 (0)
25,880 (0)
0.00%
0.00%
+1.41%
-1.53%
0.00%
+∞%
+∞%
+∞%
0.00%
0.00%
0.00%
0.00%
0.00%
44,089 (+2)
1,522 (-1)
12,029 (+45)
106,920 (-881)
758 (0)
1,347 (-25)
1,457 (-36)
1,540 (-14)
25,425 (+7)
96,016 (+331)
144,131 (-61)
65,951 (-15)
47,582 (-9)
+0.00%
-0.07%
+0.38%
-0.82%
0.00%
-1.82%
-2.41%
-0.90%
+0.03%
+0.35%
-0.04%
-0.02%
-0.02%
47,558 (0)
2,411 (0)
14,178 (+45)
36,343 (0)
758 (0)
976 (+18)
1,060 (0)
1,144 (+3)
25,774 (0)
73,056 (+4)
47,273 (-21,867)
71,130 (0)
49,745 (0)
0.00%
0.00%
+0.32%
0.00%
0.00%
+1.88%
0.00%
+0.26%
0.00%
+0.01%
-31.63%
0.00%
0.00%
47,558 (0)
2,411 (0)
18,678 (+45)
868,461 (-5,028)
758 (-281)
3,585 (+7)
3,785 (0)
3,948 (-7)
26,190 (0)
221,245 (-486)
399,761 (+212)
91,270 (0)
49,757 (0)
0.00%
0.00%
+0.24%
-0.58%
-27.05%
+0.20%
0.00%
-0.18%
0.00%
-0.22%
+0.05%
0.00%
0.00%
6,656 (0)
2,304 (+2)
1,536 (0)
2,560 (0)
2,560 (0)
512 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,536 (+2)
3,328 (0)
4,864 (+2)
Bridgehub 5,327,424 (0) createNewChain
getZKChain
4,111,094 (+25,743)
0 (-758)
+0.63%
-100.00%
4,111,094 (+25,743)
2,931 (+11)
+0.63%
+0.38%
4,111,094 (+25,743)
2,758 (0)
+0.63%
0.00%
4,111,094 (+25,743)
5,039 (0)
+0.63%
0.00%
15 (0)
45 (+5)
TestnetERC20Token 800,383 (0) approve
mint
transfer
24,247 (0)
34,018 (0)
46,273 (0)
0.00%
0.00%
0.00%
46,234 (-3)
61,786 (-161)
46,631 (+7)
-0.01%
-0.26%
+0.02%
46,195 (0)
68,242 (0)
46,573 (-12)
0.00%
0.00%
-0.03%
46,543 (0)
68,602 (0)
46,873 (0)
0.00%
0.00%
0.00%
1,527 (+15)
1,704 (+25)
257 (0)
MailboxFacet 3,287,412 (+12) finalizeEthWithdrawal 8,101 (0) 0.00% 49,205 (+123) +0.25% 49,490 (0) 0.00% 49,490 (0) 0.00% 257 (0)
ChainAdmin 909,847 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,166 (-88) -0.19% 45,345 (0) 0.00% 45,645 (0) 0.00% 256 (0)
DiamondInit 625,076 (0) initialize 22,569 (0) 0.00% 396,266 (+606) +0.15% 400,257 (0) 0.00% 420,157 (0) 0.00% 129 (+4)
PermanentRestriction 1,147,705 (0) allowAdminImplementation
setAllowedData
setSelectorIsValidated
47,494 (0)
48,656 (+423)
47,583 (0)
0.00%
+0.88%
0.00%
47,743 (+5)
49,334 (+70)
47,614 (-1)
+0.01%
+0.14%
-0.00%
47,866 (0)
48,980 (+72)
47,631 (0)
0.00%
+0.15%
0.00%
47,866 (0)
51,029 (0)
47,631 (0)
0.00%
0.00%
0.00%
258 (0)
257 (0)
258 (0)
MerkleTest 520,004 (0) calculateRoot(bytes32[],uint256,bytes32) 565 (0) 0.00% 2,931 (+1) +0.03% 2,982 (0) 0.00% 3,037 (+11) +0.36% 265 (0)
AccessControlRestriction 1,759,703 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,036 (0)
48,605 (0)
47,940 (0)
0.00%
0.00%
0.00%
51,272 (-5)
49,426 (+5)
48,847 (-1)
-0.01%
+0.01%
-0.00%
51,408 (0)
48,977 (0)
48,312 (0)
0.00%
0.00%
0.00%
51,408 (0)
51,877 (0)
51,658 (0)
0.00%
0.00%
0.00%
1,024 (0)
1,280 (0)
1,280 (0)
MerkleTreeNoSort 583,114 (0) getProof 2,608 (0) 0.00% 32,751 (-2) -0.01% 33,207 (0) 0.00% 33,229 (0) 0.00% 277 (0)
DummyChainTypeManagerWBH 4,576,779 (0) setZKChain 44,085 (0) 0.00% 44,125 (+2) +0.00% 44,145 (0) 0.00% 44,145 (0) 0.00% 256 (0)
L1ERC20Bridge 1,430,511 (0) deposit(address,address,uint256,uint256,uint256) 27,781 (0) 0.00% 62,856 (-2) -0.00% 77,202 (0) 0.00% 94,323 (-12) -0.01% 12 (0)
MessageRoot 1,508,675 (-12)
ReenterL1ERC20Bridge 406,580 (-12)
ValidatorTimelock 987,789 (-12)

Copy link

Coverage after merging ra/fix-commented-unit-tests-sync-layer-reorg into kl/sync-layer-reorg will be

86.55%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../da-contracts/contracts
   RollupL1DAValidator.sol64.94%37.50%83.33%70.91%145, 148, 148, 148, 150, 183–184, 187–188, 27, 27–28, 30, 30–31, 34, 36–37, 41–42, 65, 67, 67, 67–68, 70
contracts/bridge
   BridgeHelper.sol93.33%50%100%100%22
   BridgedStandardERC20.sol73.33%25%92.31%75.93%107–108, 113–114, 126–127, 151–152, 193, 193, 200, 200, 207, 207, 218, 54–55, 81–82
   L1ERC20Bridge.sol93.18%80%100%93.75%188–189, 264
   L1Nullifier.sol77.73%60%80%83.57%111–112, 127, 127–128, 135, 135–136, 143, 143–144, 173–174, 233–234, 236–237, 246–247, 255–256, 258, 424, 426–427, 427, 427, 429–430, 430, 430, 455–456, 477–478, 517, 611, 697, 699, 701, 714, 728, 733
contracts/bridge/asset-router
   AssetRouterBase.sol83.78%40%100%88%138–139, 57–58, 85–86
   L1AssetRouter.sol90.20%72%92%94.17%204–205, 241, 250, 252, 255, 57, 576, 58, 73–74, 81–82
contracts/bridge/ntv
   L1NativeTokenVault.sol94.90%90.91%92.86%96.77%135, 227, 227–228
   NativeTokenVault.sol89.12%72.73%90.48%92.31%192, 194, 212–213, 220–221, 380, 382, 394–395, 447, 452, 64–65
contracts/bridgehub
   Bridgehub.sol79.40%48.48%91.11%86.16%111, 111–112, 118–119, 126–127, 133–134, 140, 140–141, 175–176, 222–223, 223, 223–224, 231–232, 234–235, 238–239, 249–250, 264–265, 314–315, 317–318, 375–376, 391–392, 422–423, 506–507, 588, 687, 690–691, 695–696, 729–730, 743, 786–787, 789–790, 792–793, 827–828, 831–832, 834–835, 870, 875, 884
   CTMDeploymentTracker.sol79.07%50%90%94.74%115, 119, 34, 41, 64, 91, 94, 96
   MessageRoot.sol91.07%63.64%100%96.97%116–117, 148, 69, 87
contracts/common
   ReentrancyGuard.sol90%66.67%100%92.86%78–79
contracts/common/libraries
   DataEncoding.sol71.43%37.50%100%75%108, 112, 119, 129, 129–131, 134, 75, 83
   DynamicIncrementalMerkle.sol74.42%100%80%72.22%67–70, 72–74, 76–78
   FullMerkle.sol100%100%100%100%
   L2ContractHelper.sol44.44%0%50%52%100, 100–101, 109, 139, 143, 56, 68–69, 74–75, 78–79, 93, 95, 95–96
   Merkle.sol96.61%90.91%100%97.67%80–81
   MessageHashing.sol100%100%100%100%
   SemVer.sol100%100%100%100%
   SystemContractsCaller.sol0%0%0%0%114, 122–125, 135–138, 138–139, 141, 141–142, 33, 33–34, 37, 45, 47, 49, 51, 53, 66, 66, 66, 69, 72, 75, 78, 89, 91, 93, 96, 98
   UncheckedMath.sol100%100%100%100%
   UnsafeBytes.sol84.21%100%83.33%84.62%35–36
contracts/governance
   AccessControlRestriction.sol100%100%100%100%
   ChainAdmin.sol95.12%80%100%96.15%27–28
   Governance.sol98.15%94.74%100%98.55%45–46
   PermanentRestriction.sol87.32%78.57%100%87.23%142, 142–143, 146, 148, 148–149, 176–177
contracts/state-transition
   ChainTypeManager.sol70.99%33.33%68.57%80.58%108, 135–136, 138–139, 141–142, 144–145, 200–201, 252, 276, 295, 302, 309, 317, 324, 332, 339, 357, 359, 424, 443, 443, 443, 446, 446, 446, 448, 461, 466, 491, 74, 87–88
   TestnetVerifier.sol77.78%66.67%100%75%16, 28
   ValidatorTimelock.sol95.08%83.33%100%95.24%200, 82–83
   Verifier.sol89.90%40%96.30%90.93%1674–1675, 287–302, 305–308, 311–318, 321–328, 331–332, 335–336, 339, 383–384, 394–395, 405–406, 416–417, 427–428, 443–444, 453, 453–454, 905–906
contracts/state-transition/chain-deps
   DiamondInit.sol78%45.45%100%86.49%39–40, 42–43, 45–46, 48–49, 51–52, 77
   DiamondProxy.sol92.31%75%100%100%16, 27
contracts/state-transition/chain-deps/facets
   Admin.sol75.46%39.66%95.45%87.50%104–105, 115–116, 130, 130–131, 133–134, 157–158, 239, 241, 254–255, 261, 263, 266, 266, 266, 284, 295–296, 301, 313, 313, 315, 315, 315, 321, 321, 321–322, 322, 322–324, 324, 324–325, 325, 325–327, 354, 356, 360, 369, 379, 383, 40, 40
   Executor.sol81.61%62.34%96%87.02%120–121, 173, 178, 183, 188, 193, 198, 202–203, 208–210, 212–213, 227–228, 246–247, 317–318, 355–358, 360, 38, 416, 416, 416–419, 421, 424, 427–428, 441, 444–445, 447–449, 462–464, 520–521, 525–526, 548–549,

@Raid5594 Raid5594 merged commit 9aa7401 into kl/sync-layer-reorg Sep 20, 2024
25 checks passed
@Raid5594 Raid5594 deleted the ra/fix-commented-unit-tests-sync-layer-reorg branch September 20, 2024 12:30
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.

2 participants