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-dev #791

Merged
merged 14 commits into from
Sep 10, 2024
Merged

chore: Kl/merge-dev #791

merged 14 commits into from
Sep 10, 2024

Conversation

kelemeno
Copy link
Contributor

Co-authored-by: Raid Ateir [email protected]
Co-authored-by: Stanislav Bezkorovainyi [email protected]

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.

Copy link

Changes to gas cost

Generated at commit: 9a5531d3e687bb4bcf4ebcc5b4df1306738c652a, compared to commit: cb42ae402af3e3f676003f44a49da4ea37a6811c

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter acceptOwnership
addTokenAssetId
chainTypeManager
initialize
setAddresses
setCTM
setPendingAdmin
+67 ❌
+8,974 ❌
-189 ✅
+22 ❌
+14,961 ❌
+45 ❌
+6,027 ❌
+0.26%
+24.52%
-9.21%
+0.09%
+29.34%
+0.10%
+14.50%
TransparentUpgradeableProxy bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
createNewChain
depositHappened
depositLegacyErc20Bridge
encodeTxDataHash
finalizeWithdrawal
getERC20Getters
getHyperchain
legacyBridge
nativeTokenVault
nullifyChainBalanceByNTV
paused
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setNewVersionUpgrade
setUpgradeDiamondCut
transferFundsFromSharedBridge
transferTokenToNTV
unpause
updateChainBalancesFromSharedBridge
+10,328 ❌
+14,654 ❌
+6,222 ❌
+1,435 ❌
-65 ✅
+15,008 ❌
+23 ❌
-66 ✅
+7,739 ❌
-1,944 ✅
+24,233 ❌
+1,458 ❌
+22 ❌
-12 ✅
-12 ✅
-22 ✅
+22 ❌
+16,686 ❌
+12 ❌
+244 ❌
+21,908 ❌
+12 ❌
+12 ❌
+92 ❌
-50 ✅
-1 ✅
+2,533 ❌
+13.49%
+30.08%
+7.22%
+1.72%
-3.67%
+19.86%
+0.03%
-2.20%
+5.84%
-35.66%
+25.93%
+14.05%
+0.47%
-0.27%
-0.39%
-0.07%
+2.28%
+14.99%
+0.01%
+0.46%
+41.51%
+0.01%
+0.01%
+0.19%
-0.16%
-0.00%
+5.20%
L1AssetRouter bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
depositLegacyErc20Bridge
finalizeWithdrawal
initialize
setAssetHandlerAddressThisChain
setL1Erc20Bridge
setNativeTokenVault
unpause
-462 ✅
+14,654 ❌
+6,214 ❌
-1,109 ✅
+7,739 ❌
+23,941 ❌
-67,734 ✅
-9,838 ✅
-45 ✅
+42,469 ❌
-1 ✅
-0.96%
+75.04%
+10.46%
-1.87%
+6.97%
+35.80%
-48.45%
-20.05%
-0.19%
+175.06%
-0.01%
L1NativeTokenVault bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
chainBalance
getERC20Getters
initialize
transferFundsFromSharedBridge
updateChainBalancesFromSharedBridge
+34,122 ❌
+5,036 ❌
+1,989 ❌
-48 ✅
+1,443 ❌
+4,289 ❌
+92 ❌
+2,533 ❌
+97.96%
+14.32%
+6.42%
-4.44%
+45.05%
+8.59%
+0.43%
+10.14%
TestnetERC20Token approve
mint
transfer
+454 ❌
+9,312 ❌
+355 ❌
+0.99%
+17.69%
+0.77%
DiamondProxy executeBatchesSharedBridge
finalizeEthWithdrawal
getAdmin
getChainId
getPriorityTreeRoot
proveBatchesSharedBridge
requestL2Transaction
setPriorityTreeStartIndex
+493 ❌
-236 ✅
+22 ❌
+22 ❌
+22 ❌
+82 ❌
-737 ✅
-22 ✅
+1.24%
-0.31%
+0.43%
+0.24%
+0.33%
+0.19%
-0.57%
-0.04%
TestExecutor commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
setPriorityTreeStartIndex
+4,148 ❌
-226 ✅
-198 ✅
-22 ✅
+14.79%
-2.82%
-2.47%
-0.10%
GettersFacetWrapper util_setFirstUnprocessedPriorityTx
util_setIsDiamondStorageFrozen
util_setL2SystemContractsUpgradeTxHash
util_setValidator
-44 ✅
+22 ❌
+22 ❌
+22 ❌
-0.10%
+0.05%
+0.05%
+0.06%
MerkleTest calculateRoot(bytes32[],bytes32[],uint256,bytes32[])
calculateRoot(bytes32[],uint256,bytes32)
+419 ❌
+1 ❌
+7.89%
+0.03%
L1ERC20Bridge claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
depositAmount
finalizeWithdrawal
initialize
isWithdrawalFinalized
l2TokenAddress
-36 ✅
+20 ❌
+43 ❌
+8 ❌
+1,985 ❌
+66 ❌
+22 ❌
+6 ❌
-0.09%
+0.03%
+0.06%
+0.63%
+5.61%
+0.28%
+1.95%
+0.49%
Bridgehub addTokenAssetId
createNewChain
getZKChain
l1CtmDeployer
setAddresses
+2,121 ❌
+117 ❌
+22 ❌
+22 ❌
-22 ✅
+4.46%
+0.00%
+0.76%
+0.93%
-0.03%
ValidatorTimelock addValidator
commitBatchesSharedBridge
executeBatchesSharedBridge
getCommittedBatchTimestamp
proveBatchesSharedBridge
removeValidator
revertBatchesSharedBridge
setChainTypeManager
validators
-22 ✅
+326 ❌
+330 ❌
-22 ✅
+72 ❌
+44 ❌
-30 ✅
-22 ✅
+44 ❌
-0.04%
+0.57%
+1.01%
-1.34%
+0.22%
+0.14%
-0.11%
-0.05%
+2.65%
VerifierTest verificationKeyHash
verify
-33 ✅
-245 ✅
-3.20%
-0.18%
VerifierRecursiveTest verificationKeyHash
verify
-33 ✅
-248 ✅
-3.20%
-0.18%
Utils constructRollupL2DAValidatorOutputHash
createCommitBatchInfo
encodePacked
getExecutorSelectors
getGettersSelectors
getMailboxSelectors
makeInitializeDataForNewChain
randomBytes32
-14 ✅
-22 ✅
-125 ✅
-22 ✅
-22 ✅
+44 ❌
+45 ❌
-21 ✅
-1.01%
-0.53%
-0.89%
-1.79%
-0.35%
+2.49%
+2.24%
-1.93%
PriorityTreeTest initFromCommitment
processBatch
push
-17 ✅
+826 ❌
-1 ✅
-0.03%
+2.26%
-0.00%
ChainTypeManager createNewChain
getHyperchain
+40 ❌
+22 ❌
+0.00%
+1.39%
GettersFacet getChainId
getPriorityTreeRoot
+22 ❌
+22 ❌
+0.93%
+0.80%
MailboxFacet finalizeEthWithdrawal
requestL2Transaction
-238 ✅
-727 ✅
-0.48%
-0.73%
PermanentRestriction setAllowedData
validateCall
-91 ✅
+66 ❌
-0.18%
+0.23%
GenerateForceDeploymentsData run -77 ✅ -0.04%
ChainAdmin multicall
setUpgradeTimestamp
0 ➖
+3 ❌
0.00%
+0.01%
DiamondCutTestContract diamondCut +2 ❌ +0.00%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 5,364,532 (+64,492) acceptAdmin
acceptOwnership
addChainTypeManager
addTokenAssetId
admin
chainTypeManager
chainTypeManagerIsRegistered
initialize
owner
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
setAddresses
setCTM
setPendingAdmin
23,483 (0)
25,526 (+67)
23,865 (0)
26,246 (+2,090)
411 (0)
530 (-22)
644 (0)
24,111 (+22)
384 (-22)
0 (0)
0 (0)
0 (0)
23,802 (0)
24,282 (-26,708)
44,193 (+45)
25,880 (-12)
0.00%
+0.26%
0.00%
+8.65%
0.00%
-3.99%
0.00%
+0.09%
-5.42%
+∞%
+∞%
+∞%
0.00%
-52.38%
+0.10%
-0.05%
45,498 (+6,421)
25,526 (+67)
44,091 (+2,975)
45,575 (+8,974)
1,522 (+111)
1,863 (-189)
1,339 (+29)
24,111 (+22)
1,903 (-61)
1,361 (-20)
1,474 (+5)
1,554 (+1,554)
25,418 (-2)
65,951 (+14,961)
44,230 (+45)
47,589 (+6,027)
+16.43%
+0.26%
+7.24%
+24.52%
+7.87%
-9.21%
+2.21%
+0.09%
-3.11%
-1.45%
+0.34%
+∞%
-0.01%
+29.34%
+0.10%
+14.50%
46,874 (0)
25,526 (+67)
47,558 (0)
49,704 (+12,748)
2,411 (0)
2,530 (-22)
644 (0)
24,111 (+22)
2,384 (-22)
958 (-11)
1,060 (0)
1,144 (+1,144)
25,774 (0)
71,130 (+20,140)
44,241 (+45)
49,745 (+204)
0.00%
+0.26%
0.00%
+34.50%
0.00%
-0.86%
0.00%
+0.09%
-0.91%
-1.14%
0.00%
+∞%
0.00%
+39.50%
+0.10%
+0.41%
46,874 (0)
25,526 (+67)
47,558 (0)
49,704 (+2,121)
2,411 (0)
2,530 (-22)
2,644 (0)
24,111 (+22)
2,384 (-22)
3,585 (-22)
3,792 (0)
3,962 (+3,962)
26,190 (0)
91,270 (+40,280)
44,253 (+45)
49,757 (0)
0.00%
+0.26%
0.00%
+4.46%
0.00%
-0.86%
0.00%
+0.09%
-0.91%
-0.61%
0.00%
+∞%
0.00%
+79.00%
+0.10%
0.00%
4,352 (+3,584)
34 (+17)
6,656 (+3,072)
4,096 (+2,560)
2,303 (+257)
4,608 (+3,584)
5,888 (+2,816)
34 (+17)
1,348 (+34)
512 (0)
512 (0)
512 (+256)
2,048 (0)
3,328 (+2,816)
2,816 (+2,048)
4,863 (+3,585)
TransparentUpgradeableProxy 787,868 (-199,936) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
createNewChain
depositHappened
depositLegacyErc20Bridge
encodeTxDataHash
finalizeWithdrawal
getERC20Getters
getHyperchain
legacyBridge
nativeTokenVault
nullifyChainBalanceByNTV
paused
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setNewVersionUpgrade
setUpgradeDiamondCut
tokenAddress
transferFundsFromSharedBridge
transferTokenToNTV
unpause
updateChainBalancesFromSharedBridge
45,479 (-103)
48,687 (+14,652)
46,892 (+7,452)
29,858 (-22)
1,185 (-48)
47,227 (+7,518)
55,516 (+12)
1,173 (-66)
39,720 (-22)
2,508 (-52)
58,791 (+17,606)
11,834 (+1,458)
4,701 (+22)
971 (-12)
949 (-12)
31,315 (-22)
985 (+22)
28,911 (-16)
96,005 (+12)
32,952 (-45)
32,997 (-46)
200,413 (+12)
96,788 (+12)
0 (0)
37,350 (0)
31,095 (-50)
31,968 (-1)
51,161 (+2,533)
-0.23%
+43.05%
+18.89%
-0.07%
-3.89%
+18.93%
+0.02%
-5.33%
-0.06%
-2.03%
+42.75%
+14.05%
+0.47%
-1.22%
-1.25%
-0.07%
+2.28%
-0.06%
+0.01%
-0.14%
-0.14%
+0.01%
+0.01%
+∞%
0.00%
-0.16%
-0.00%
+5.21%
86,882 (+10,328)
63,367 (+14,654)
92,454 (+6,222)
84,631 (+1,435)
1,708 (-65)
90,572 (+15,008)
69,677 (+23)
2,937 (-66)
140,155 (+7,739)
3,508 (-1,944)
117,698 (+24,233)
11,834 (+1,458)
4,701 (+22)
4,371 (-12)
3,074 (-12)
31,315 (-22)
985 (+22)
128,005 (+16,686)
96,005 (+12)
53,043 (+244)
74,685 (+21,908)
200,413 (+12)
96,788 (+12)
3,637 (+3,449)
48,996 (+92)
31,095 (-50)
31,968 (-1)
51,275 (+2,533)
+13.49%
+30.08%
+7.22%
+1.72%
-3.67%
+19.86%
+0.03%
-2.20%
+5.84%
-35.66%
+25.93%
+14.05%
+0.47%
-0.27%
-0.39%
-0.07%
+2.28%
+14.99%
+0.01%
+0.46%
+41.51%
+0.01%
+0.01%
+1834.57%
+0.19%
-0.16%
-0.00%
+5.20%
83,827 (+9,507)
70,708 (+14,655)
99,384 (+8,183)
86,778 (+6,396)
1,185 (-81)
96,112 (+18,705)
69,677 (+23)
1,173 (-66)
190,334 (+11,619)
2,508 (-4,552)
135,499 (+28,313)
11,834 (+1,458)
4,701 (+22)
971 (-12)
949 (-12)
31,315 (-22)
985 (+22)
128,480 (+18,018)
96,005 (+12)
53,295 (-45)
75,827 (+22,509)
200,413 (+12)
96,788 (+12)
3,090 (+3,090)
48,855 (+137)
31,095 (-50)
31,968 (-1)
51,275 (+2,533)
+12.79%
+26.14%
+8.97%
+7.96%
-6.40%
+24.16%
+0.03%
-5.33%
+6.50%
-64.48%
+26.41%
+14.05%
+0.47%
-1.22%
-1.25%
-0.07%
+2.28%
+16.31%
+0.01%
-0.08%
+42.22%
+0.01%
+0.01%
+∞%
+0.28%
-0.16%
-0.00%
+5.20%
134,395 (+22,402)
70,708 (+14,655)
129,593 (+4,143)
111,404 (-8,394)
9,685 (-81)
120,218 (+18,417)
83,838 (+34)
9,673 (-66)
190,411 (+11,619)
7,008 (-52)
153,492 (+28,450)
11,834 (+1,458)
4,701 (+22)
9,471 (-12)
9,449 (-12)
31,315 (-22)
985 (+22)
135,575 (+22,269)
96,005 (+12)
53,340 (0)
75,827 (+22,509)
200,413 (+12)
96,788 (+12)
9,590 (-44)
59,632 (+91)
31,095 (-50)
31,968 (-1)
51,389 (+2,533)
+20.00%
+26.14%
+3.30%
-7.01%
-0.83%
+18.09%
+0.04%
-0.68%
+6.50%
-0.74%
+22.75%
+14.05%
+0.47%
-0.13%
-0.13%
-0.07%
+2.28%
+19.65%
+0.01%
0.00%
+42.22%
+0.01%
+0.01%
-0.46%
+0.15%
-0.16%
-0.00%
+5.18%
4 (0)
3 (0)
10 (0)
8 (0)
673 (-586)
8 (0)
2 (0)
53 (0)
3 (0)
9 (-5)
19 (0)
1 (0)
15 (0)
5 (0)
4 (0)
1 (0)
3 (0)
876 (+729)
1 (0)
148 (+73)
75 (0)
1 (0)
1 (0)
4,402 (+4,351)
5 (0)
1 (0)
1 (0)
2 (0)
L1AssetRouter 4,128,300 (-1,143,014) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
depositLegacyErc20Bridge
finalizeWithdrawal
initialize
legacyBridge
nativeTokenVault
paused
setAssetHandlerAddressThisChain
setL1Erc20Bridge
setNativeTokenVault
unpause
16,546 (+2,470)
19,498 (+14,652)
17,378 (+7,452)
520 (-22)
10,088 (-22)
28,156 (+17,606)
45,226 (-94)
379 (-12)
357 (-12)
393 (+22)
7,604 (+44)
4,664 (-45)
4,697 (-40)
8,615 (-1)
+17.55%
+302.35%
+75.08%
-4.06%
-0.22%
+166.88%
-0.21%
-3.07%
-3.25%
+5.93%
+0.58%
-0.96%
-0.84%
-0.01%
47,683 (-462)
34,181 (+14,654)
65,597 (+6,214)
58,298 (-1,109)
118,788 (+7,739)
90,822 (+23,941)
72,066 (-67,734)
1,179 (-12)
857 (-12)
393 (+22)
39,237 (-9,838)
24,236 (-45)
66,728 (+42,469)
8,615 (-1)
-0.96%
+75.04%
+10.46%
-1.87%
+6.97%
+35.80%
-48.45%
-1.01%
-1.38%
+5.93%
-20.05%
-0.19%
+175.06%
-0.01%
52,630 (+5,265)
41,523 (+14,655)
69,672 (+8,177)
57,445 (+6,396)
173,106 (+11,619)
111,484 (+27,619)
72,434 (-68,661)
379 (-12)
357 (-12)
393 (+22)
29,504 (-19,856)
24,771 (-45)
68,735 (+43,941)
8,615 (-1)
+11.12%
+54.54%
+13.30%
+12.53%
+7.20%
+32.93%
-48.66%
-3.07%
-3.25%
+5.93%
-40.23%
-0.18%
+177.22%
-0.01%
68,044 (-15,730)
41,523 (+14,655)
109,267 (+4,124)
86,873 (-33,543)
173,171 (+11,619)
129,477 (+27,756)
72,434 (-68,661)
2,379 (-12)
2,357 (-12)
393 (+22)
49,404 (+44)
24,771 (-45)
68,735 (+43,941)
8,615 (-1)
-18.78%
+54.54%
+3.92%
-27.86%
+7.19%
+27.29%
-48.66%
-0.50%
-0.51%
+5.93%
+0.09%
-0.18%
+177.22%
-0.01%
8 (+4)
3 (0)
10 (0)
8 (0)
3 (0)
19 (0)
74 (0)
5 (0)
4 (0)
3 (0)
147 (0)
75 (0)
843 (+768)
1 (0)
L1NativeTokenVault 3,828,533 (+1,359,901) bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
chainBalance
getERC20Getters
initialize
receive
registerToken
tokenAddress
transferFundsFromSharedBridge
updateChainBalancesFromSharedBridge
12,557 (+7,314)
10,518 (+3,148)
5,239 (+22)
587 (-48)
4,646 (+1,443)
23,155 (+68)
109 (+26)
453 (+18)
495 (-2,044)
8,810 (0)
27,522 (+2,533)
+139.50%
+42.71%
+0.42%
-7.56%
+45.05%
+0.29%
+31.33%
+4.14%
-80.50%
0.00%
+10.14%
68,955 (+34,122)
40,207 (+5,036)
32,951 (+1,989)
1,032 (-48)
4,646 (+1,443)
54,217 (+4,289)
109 (+26)
97,963 (+17,666)
1,554 (-985)
21,516 (+92)
27,522 (+2,533)
+97.96%
+14.32%
+6.42%
-4.44%
+45.05%
+8.59%
+31.33%
+22.00%
-38.79%
+0.43%
+10.14%
79,756 (+50,974)
34,588 (+5,353)
38,449 (+2,274)
587 (-48)
4,646 (+1,443)
52,593 (+2,297)
109 (+26)
99,956 (+17,790)
2,495 (-44)
20,559 (+137)
27,522 (+2,533)
+177.10%
+18.31%
+6.29%
-7.56%
+45.05%
+4.57%
+31.33%
+21.65%
-1.73%
+0.67%
+10.14%
79,756 (+9,050)
52,422 (+5,341)
47,472 (+2,268)
2,587 (-48)
4,646 (+1,443)
72,493 (+22,197)
109 (+26)
107,051 (+22,269)
2,495 (-44)
33,237 (+91)
27,522 (+2,533)
+12.80%
+11.34%
+5.02%
-1.82%
+45.05%
+44.13%
+31.33%
+26.27%
-1.73%
+0.27%
+10.14%
1,297 (+1,280)
14 (0)
8 (0)
673 (0)
1 (0)
876 (+802)
2 (0)
1,134 (+951)
4,353 (+4,352)
5 (0)
2 (0)
TestnetERC20Token 800,383 (0) allowance
approve
balanceOf
mint
transfer
753 (0)
24,247 (-12)
0 (0)
34,018 (-12)
46,273 (0)
0.00%
-0.05%
+∞%
-0.04%
0.00%
2,749 (+255)
46,236 (+454)
575 (-820)
61,946 (+9,312)
46,628 (+355)
+10.22%
+0.99%
-58.78%
+17.69%
+0.77%
2,753 (0)
46,207 (+36)
558 (0)
68,242 (+17,112)
46,573 (+300)
0.00%
+0.08%
0.00%
+33.47%
+0.65%
2,753 (0)
46,543 (+372)
2,558 (0)
68,602 (0)
46,873 (+600)
0.00%
+0.81%
0.00%
0.00%
+1.30%
2,081 (+2,050)
1,512 (+1,353)
2,354 (+2,302)
1,679 (+1,353)
257 (+256)
DiamondProxy 2,475,597 (+12) commitBatchesSharedBridge
executeBatchesSharedBridge
finalizeEthWithdrawal
getAdmin
getChainId
getPriorityTreeRoot
proveBatchesSharedBridge
requestL2Transaction
setPriorityTreeStartIndex
util_setChainId
0 (0)
40,124 (+493)
37,590 (+22)
1,128 (+22)
5,113 (+22)
1,490 (+22)
42,767 (+82)
33,146 (0)
50,749 (-22)
28,906 (0)
+∞%
+1.24%
+0.06%
+1.99%
+0.43%
+1.50%
+0.19%
0.00%
-0.04%
0.00%
39,066 (+5,581)
40,124 (+493)
76,121 (-236)
5,178 (+22)
9,113 (+22)
6,740 (+22)
42,767 (+82)
128,872 (-737)
50,749 (-22)
33,730 (-3)
+16.67%
+1.24%
-0.31%
+0.43%
+0.24%
+0.33%
+0.19%
-0.57%
-0.04%
-0.01%
65,554 (+44,282)
40,124 (+493)
76,719 (+145)
5,128 (+22)
9,613 (+22)
6,740 (+22)
42,767 (+82)
166,296 (0)
50,749 (-22)
33,718 (0)
+208.17%
+1.24%
+0.19%
+0.43%
+0.23%
+0.33%
+0.19%
0.00%
-0.04%
0.00%
91,803 (+4,074)
40,124 (+493)
77,007 (+133)
9,628 (+22)
9,613 (+22)
11,990 (+22)
42,767 (+82)
188,247 (-2,188)
50,749 (-22)
34,090 (0)
+4.64%
+1.24%
+0.17%
+0.23%
+0.23%
+0.18%
+0.19%
-1.15%
-0.04%
0.00%
42 (+12)
1 (0)
257 (0)
10 (0)
9 (0)
2 (0)
1 (0)
771 (0)
1 (0)
519 (0)
TestExecutor 3,484,961 (+392,241) commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
setPriorityTreeStartIndex
7,814 (-45)
7,791 (-226)
7,813 (-198)
22,310 (-22)
-0.57%
-2.82%
-2.47%
-0.10%
32,190 (+4,148)
7,791 (-226)
7,813 (-198)
22,310 (-22)
+14.79%
-2.82%
-2.47%
-0.10%
32,224 (+4,525)
7,791 (-226)
7,813 (-198)
22,310 (-22)
+16.34%
-2.82%
-2.47%
-0.10%
46,788 (+2,846)
7,791 (-226)
7,813 (-198)
22,310 (-22)
+6.48%
-2.82%
-2.47%
-0.10%
23 (+8)
1 (0)
1 (0)
1 (0)
GettersFacetWrapper 2,192,875 (+12,234) getBridgehub
getProtocolVersion
getTotalBlocksExecuted
isDiamondStorageFrozen
util_setFirstUnprocessedPriorityTx
util_setIsDiamondStorageFrozen
util_setL2SystemContractsUpgradeTxHash
util_setValidator
398 (-42)
381 (-23)
405 (+45)
427 (+22)
45,822 (-44)
43,729 (+22)
43,999 (+22)
24,370 (+22)
-9.55%
-5.69%
+12.50%
+5.43%
-0.10%
+0.05%
+0.05%
+0.09%
398 (-42)
381 (-23)
405 (+45)
427 (+22)
45,822 (-44)
43,729 (+22)
43,999 (+22)
34,326 (+22)
-9.55%
-5.69%
+12.50%
+5.43%
-0.10%
+0.05%
+0.05%
+0.06%
398 (-42)
381 (-23)
405 (+45)
427 (+22)
45,822 (-44)
43,729 (+22)
43,999 (+22)
34,326 (+22)
-9.55%
-5.69%
+12.50%
+5.43%
-0.10%
+0.05%
+0.05%
+0.06%
398 (-42)
381 (-23)
405 (+45)
427 (+22)
45,822 (-44)
43,729 (+22)
43,999 (+22)
44,282 (+22)
-9.55%
-5.69%
+12.50%
+5.43%
-0.10%
+0.05%
+0.05%
+0.05%
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
2 (0)
MerkleTest 520,004 (+20,869) calculateRoot(bytes32[],bytes32[],uint256,bytes32[])
calculateRoot(bytes32[],uint256,bytes32)
1,595 (+481)
565 (0)
+43.18%
0.00%
5,731 (+419)
2,930 (+1)
+7.89%
+0.03%
1,856 (+399)
2,982 (0)
+27.39%
0.00%
13,520 (+366)
3,037 (+11)
+2.78%
+0.36%
8 (0)
265 (0)
L1ERC20Bridge 1,380,432 (+46,036) claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
depositAmount
finalizeWithdrawal
initialize
isWithdrawalFinalized
l2Bridge
l2TokenAddress
l2TokenBeacon
l2TokenProxyBytecodeHash
30,864 (+12)
27,793 (-10)
27,978 (+13)
755 (+8)
30,168 (0)
23,581 (+66)
581 (+22)
379 (+45)
1,242 (+6)
379 (-22)
306 (-22)
+0.04%
-0.04%
+0.05%
+1.07%
0.00%
+0.28%
+3.94%
+13.47%
+0.49%
-5.49%
-6.71%
39,141 (-36)
62,873 (+20)
71,839 (+43)
1,281 (+8)
37,347 (+1,985)
23,581 (+66)
1,152 (+22)
879 (+45)
1,242 (+6)
879 (-22)
806 (-22)
-0.09%
+0.03%
+0.06%
+0.63%
+5.61%
+0.28%
+1.95%
+5.40%
+0.49%
-2.44%
-2.66%
40,790 (-44)
77,227 (+32)
77,910 (+55)
755 (+8)
39,619 (+2,819)
23,581 (+66)
581 (+22)
379 (+45)
1,242 (+6)
379 (-22)
306 (-22)
-0.11%
+0.04%
+0.07%
+1.07%
+7.66%
+0.28%
+3.94%
+13.47%
+0.49%
-5.49%
-6.71%
41,831 (-57)
94,347 (+19)
91,374 (+42)
2,755 (+8)
40,748 (+2,806)
23,581 (+66)
2,581 (+22)
2,379 (+45)
1,242 (+6)
2,379 (-22)
2,306 (-22)
-0.14%
+0.02%
+0.05%
+0.29%
+7.40%
+0.28%
+0.86%
+1.93%
+0.49%
-0.92%
-0.95%
5 (0)
12 (0)
6 (0)
19 (0)
6 (0)
1 (0)
7 (0)
4 (0)
1 (0)
4 (0)
4 (0)
Bridgehub 5,327,424 (+64,504) addTokenAssetId
createNewChain
getZKChain
l1CtmDeployer
setAddresses
49,704 (+2,121)
4,072,722 (+117)
758 (+22)
2,390 (+22)
70,938 (-22)
+4.46%
+0.00%
+2.99%
+0.93%
-0.03%
49,704 (+2,121)
4,072,722 (+117)
2,920 (+22)
2,390 (+22)
70,938 (-22)
+4.46%
+0.00%
+0.76%
+0.93%
-0.03%
49,704 (+2,121)
4,072,722 (+117)
2,758 (+22)
2,390 (+22)
70,938 (-22)
+4.46%
+0.00%
+0.80%
+0.93%
-0.03%
49,704 (+2,121)
4,072,722 (+117)
5,039 (+22)
2,390 (+22)
70,938 (-22)
+4.46%
+0.00%
+0.44%
+0.93%
-0.03%
15 (0)
15 (0)
40 (0)
15 (0)
15 (0)
ValidatorTimelock 987,789 (-143,331) addValidator
chainTypeManager
commitBatchesSharedBridge
executeBatchesSharedBridge
executionDelay
getCommittedBatchTimestamp
proveBatchesSharedBridge
removeValidator
revertBatchesSharedBridge
setChainTypeManager
validators
29,438 (-22)
401 (+44)
30,410 (+565)
26,668 (+462)
357 (-44)
618 (-22)
28,098 (+70)
29,460 (+44)
23,916 (-33)
24,027 (-22)
702 (+44)
-0.07%
+12.32%
+1.89%
+1.76%
-10.97%
-3.44%
+0.25%
+0.15%
-0.14%
-0.09%
+6.69%
52,443 (-22)
1,401 (+44)
57,593 (+326)
33,061 (+330)
1,357 (-44)
1,618 (-22)
33,230 (+72)
30,889 (+44)
27,283 (-30)
44,530 (-22)
1,702 (+44)
-0.04%
+3.24%
+0.57%
+1.01%
-3.14%
-1.34%
+0.22%
+0.14%
-0.11%
-0.05%
+2.65%
53,355 (-22)
1,401 (+44)
63,028 (+278)
31,171 (+250)
1,357 (-44)
1,618 (-22)
33,230 (+72)
31,479 (+44)
23,928 (-33)
46,097 (-22)
1,702 (+44)
-0.04%
+3.24%
+0.44%
+0.81%
-3.14%
-1.34%
+0.22%
+0.14%
-0.14%
-0.05%
+2.65%
53,355 (-22)
2,401 (+44)
63,040 (+278)
41,344 (+277)
2,357 (-44)
2,618 (-22)
38,362 (+73)
31,730 (+44)
34,007 (-22)
46,097 (-22)
2,702 (+44)
-0.04%
+1.87%
+0.44%
+0.67%
-1.83%
-0.83%
+0.19%
+0.14%
-0.06%
-0.05%
+1.66%
50 (0)
2 (0)
6 (0)
3 (0)
2 (0)
2 (0)
2 (0)
3 (0)
3 (0)
25 (0)
10 (0)
VerifierTest 3,772,418 (-24,450) verificationKeyHash
verify
998 (-33)
3,966 (-245)
-3.20%
-5.82%
998 (-33)
135,204 (-245)
-3.20%
-0.18%
998 (-33)
3,966 (-245)
-3.20%
-5.82%
998 (-33)
360,630 (-245)
-3.20%
-0.07%
1 (0)
11 (0)
VerifierRecursiveTest 3,772,850 (-24,378) verificationKeyHash
verify
999 (-33)
4,276 (-248)
-3.20%
-5.48%
999 (-33)
137,522 (-248)
-3.20%
-0.18%
999 (-33)
4,276 (-248)
-3.20%
-5.48%
999 (-33)
374,006 (-248)
-3.20%
-0.07%
1 (0)
14 (0)
Utils 6,037,668 (-32,049) constructRollupL2DAValidatorOutputHash
createCommitBatchInfo
encodePacked
getExecutorSelectors
getGettersSelectors
getMailboxSelectors
makeInitializeDataForNewChain
randomBytes32
1,364 (-22)
4,131 (-22)
12,476 (-1,638)
1,206 (-22)
6,290 (-22)
1,814 (+44)
2,050 (+45)
1,062 (-22)
-1.59%
-0.53%
-11.61%
-1.79%
-0.35%
+2.49%
+2.24%
-2.03%
1,378 (-14)
4,131 (-22)
13,989 (-125)
1,206 (-22)
6,290 (-22)
1,814 (+44)
2,050 (+45)
1,067 (-21)
-1.01%
-0.53%
-0.89%
-1.79%
-0.35%
+2.49%
+2.24%
-1.93%
1,364 (-22)
4,131 (-22)
14,114 (0)
1,206 (-22)
6,290 (-22)
1,814 (+44)
2,050 (+45)
1,062 (-22)
-1.59%
-0.53%
0.00%
-1.79%
-0.35%
+2.49%
+2.24%
-2.03%
1,522 (-22)
4,131 (-22)
14,114 (0)
1,206 (-22)
6,290 (-22)
1,814 (+44)
2,050 (+45)
1,144 (-22)
-1.42%
-0.53%
0.00%
-1.79%
-0.35%
+2.49%
+2.24%
-1.89%
33 (+8)
6 (0)
70 (+18)
25 (0)
56 (0)
36 (0)
48 (0)
560 (+46)
PriorityTreeTest 998,915 (-5,625) initFromCommitment
processBatch
push
54,070 (-17)
23,662 (+1,072)
90,757 (-1)
-0.03%
+4.75%
-0.00%
54,070 (-17)
37,372 (+826)
104,707 (-1)
-0.03%
+2.26%
-0.00%
54,070 (-17)
36,254 (+809)
109,056 (-1)
-0.03%
+2.28%
-0.00%
54,070 (-17)
53,319 (+614)
116,710 (-1)
-0.03%
+1.16%
-0.00%
1 (0)
4 (0)
14 (0)
ChainTypeManager 4,547,000 (0) createNewChain
getHyperchain
1,053 (0)
1,606 (+22)
0.00%
+1.39%
3,156,993 (+40)
1,606 (+22)
+0.00%
+1.39%
3,575,898 (+44)
1,606 (+22)
+0.00%
+1.39%
3,575,898 (+44)
1,606 (+22)
+0.00%
+1.39%
17 (0)
15 (0)
GettersFacet 1,152,473 (+8,853) getAdmin
getChainId
getPriorityTreeRoot
396 (+22)
2,381 (+22)
758 (+22)
+5.88%
+0.93%
+2.99%
2,196 (+22)
2,381 (+22)
2,758 (+22)
+1.01%
+0.93%
+0.80%
2,396 (+22)
2,381 (+22)
2,758 (+22)
+0.93%
+0.93%
+0.80%
2,396 (+22)
2,381 (+22)
4,758 (+22)
+0.93%
+0.93%
+0.46%
10 (0)
9 (0)
2 (0)
MailboxFacet 3,287,412 (+28,859) finalizeEthWithdrawal
requestL2Transaction
8,101 (+22)
3,139 (0)
+0.27%
0.00%
48,835 (-238)
99,106 (-727)
-0.48%
-0.73%
49,490 (+133)
135,326 (0)
+0.27%
0.00%
49,490 (+133)
159,775 (-2,188)
+0.27%
-1.35%
257 (0)
771 (0)
DiamondInit 625,076 (0) initialize 22,569 (0) 0.00% 395,660 (+1,235) +0.31% 400,257 (0) 0.00% 420,157 (0) 0.00% 125 (+6)
PermanentRestriction 1,147,705 (0) allowAdminImplementation
setAllowedData
setSelectorIsValidated
tryCompareAdminOfAChain
validateCall
47,494 (0)
48,233 (0)
47,583 (0)
453 (0)
25,921 (+66)
0.00%
0.00%
0.00%
0.00%
+0.26%
47,720 (-29)
49,199 (-91)
47,616 (+3)
19,117 (+54)
28,254 (+66)
-0.06%
-0.18%
+0.01%
+0.28%
+0.23%
47,866 (0)
48,860 (-108)
47,631 (0)
24,170 (+66)
28,551 (+66)
0.00%
-0.22%
0.00%
+0.27%
+0.23%
47,866 (0)
51,029 (0)
47,631 (0)
24,170 (+66)
29,953 (+66)
0.00%
0.00%
0.00%
+0.27%
+0.22%
258 (0)
257 (0)
258 (0)
11 (0)
7 (0)
GenerateForceDeploymentsData 1,605,524 (-11,459) run 175,922 (-77) -0.04% 175,922 (-77) -0.04% 175,922 (-77) -0.04% 175,922 (-77) -0.04% 3 (+1)
AccessControlRestriction 1,759,703 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,036 (0)
48,605 (0)
47,940 (0)
0.00%
0.00%
0.00%
51,279 (+5)
49,426 (+7)
48,851 (-2)
+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)
ChainAdmin 909,847 (0) multicall
setUpgradeTimestamp
27,048 (0)
45,273 (0)
0.00%
0.00%
43,162 (0)
45,404 (+3)
0.00%
+0.01%
43,485 (0)
45,339 (+12)
0.00%
+0.03%
64,230 (+44)
45,645 (0)
+0.07%
0.00%
515 (0)
256 (0)
MerkleTreeNoSort 583,114 (0) getProof 2,608 (0) 0.00% 32,754 (-2) -0.01% 33,207 (0) 0.00% 33,229 (0) 0.00% 277 (0)
DiamondCutTestContract 2,429,624 (+8,889) diamondCut 23,653 (0) 0.00% 203,351 (+2) +0.00% 44,650 (0) 0.00% 1,437,433 (+12) +0.00% 20 (0)
DummySharedBridge 1,594,156 (-4,521)
DummyZKChain 3,553,949 (+28,957)
IncrementalMerkleTest 365,381 (-12)
AdminFacet 4,598,143 (+12)
DefaultUpgrade 1,671,236 (+12)
TestBaseFacet 219,676 (-12)

Copy link

Coverage after merging kl/merge-dev into kl/sync-layer-reorg will be

86.00%

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.sol80.37%67.35%80.65%85.07%110–111, 126, 126–127, 134, 134–135, 142–143, 172–173, 196, 216, 223–224, 226–227, 236–237, 245–246, 248, 411, 436–437, 458–459, 497, 594, 686, 688, 690, 702, 716, 721
contracts/bridge/asset-router
   AssetRouterBase.sol77.50%40%87.50%81.48%143–144, 57–58, 85–86, 94–95
   L1AssetRouter.sol90.20%72%92%94.17%202–203, 239, 248, 250, 253, 56–57, 575, 72–73, 80–81
contracts/bridge/ntv
   L1NativeTokenVault.sol95.74%95%92.31%96.72%215, 215–216
   NativeTokenVault.sol87.76%68.18%90.48%91.35%192, 194, 212–213, 220–221, 254–255, 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, 117, 127, 127–129, 132, 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.sol67.28%33.33%60%77.67%108, 135–136, 138–139, 141–142, 144–145, 200–201, 245, 252, 270, 276, 283, 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.sol72.69%36.21%90.91%85.29%104–105, 115–116, 130, 130–131, 133–134, 157, 157, 157–158, 158, 158, 160, 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.sol76.13%57.14%92%81.25%120–121, 173, 178, 183, 188, 193, 198, 202–203, 208, 208–209, 209–210, 212, 212–213, 223, 227, 227–228, 246–247, 268, 271, 317, 317–318, 322, 326, 328–329, 335–336, 355–358,

@StanislavBreadless StanislavBreadless merged commit 6de2963 into kl/sync-layer-reorg Sep 10, 2024
25 checks passed
@StanislavBreadless StanislavBreadless deleted the kl/merge-dev branch September 10, 2024 22:20
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.

6 participants