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

Reduce owner footprint on genesis #711

Merged

Conversation

StanislavBreadless
Copy link
Collaborator

What ❔

Owner does not have to manually init bridge addresses anymore

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.

Base automatically changed from sb-sync-layer-reorg-stable-sync-2 to sync-layer-stable August 19, 2024 12:39
Copy link

github-actions bot commented Aug 19, 2024

Changes to gas cost

Generated at commit: b5550ccd7fdf5f5d728de26a062b80bd09230c25, compared to commit: 2b3d4af22ab50625db6f24df659b0bd1f10ce036

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
L1AssetRouter bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
pause
setL1Erc20Bridge
setNativeTokenVault
transferTokenToNTV
unpause
+1,383 ❌
-2,082 ✅
-33,218 ✅
+1,613 ❌
+22 ❌
+900 ❌
+22 ❌
+59,281 ❌
+8 ❌
+56 ❌
-43 ✅
+115 ❌
+115 ❌
+21 ❌
-67 ✅
+2.94%
-9.62%
-36.71%
+2.96%
+2.27%
+1.70%
+2.46%
+112.00%
+0.01%
+0.06%
-0.17%
+0.47%
+0.47%
+0.22%
-0.77%
StateTransitionManager createNewChain
initialize
setChainCreationParams
setNewVersionUpgrade
setUpgradeDiamondCut
setValidatorTimelock
-3,123,794 ✅
-29,846 ✅
+211 ❌
+606 ❌
+211 ❌
-3,217 ✅
-99.57%
-21.08%
+0.47%
+0.40%
+0.45%
-28.48%
TransparentUpgradeableProxy bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
claimFailedDeposit
createNewChain
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
getERC20Getters
l1GenesisUpgrade
legacyBridge
nativeTokenVault
pause
paused
protocolVersion
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setNewVersionUpgrade
setUpgradeDiamondCut
setValidatorTimelock
transferFundsFromSharedBridge
transferTokenToNTV
unpause
validatorTimelock
+1,383 ❌
+44 ❌
-503 ✅
+4,833 ❌
+230 ❌
-1,699 ✅
+19 ❌
+52,881 ❌
+8 ❌
+56 ❌
+808 ❌
-22 ✅
-20 ✅
-3,085 ✅
-43 ✅
-66 ✅
+1,784 ❌
-61 ✅
+334 ❌
-2 ✅
-2 ✅
+729 ❌
+334 ❌
-3,209 ✅
-6 ✅
+22 ❌
-67 ✅
+625 ❌
+1.83%
+0.09%
-0.59%
+6.38%
+0.30%
-2.48%
+0.78%
+65.50%
+0.01%
+0.05%
+8.36%
-2.04%
-0.97%
-60.51%
-0.08%
-6.20%
+50.80%
-0.05%
+0.34%
-0.00%
-0.00%
+0.36%
+0.34%
-8.10%
-0.01%
+0.07%
-0.21%
+11.74%
AdminFacet acceptAdmin
changeFeeParams
executeUpgrade
setDAValidatorPair
setPendingAdmin
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
upgradeChainFromVersion
-5,954 ✅
+37 ❌
+47,049 ❌
+22 ❌
-8,942 ✅
-22 ✅
+1,623 ❌
+15 ❌
+22 ❌
-22 ✅
-47.59%
+0.41%
+15.76%
+0.04%
-38.34%
-0.47%
+5.96%
+0.12%
+0.17%
-0.21%
MessageRoot addNewChain -95,199 ✅ -38.23%
MailboxFacet bridgehubRequestL2Transaction -46,036 ✅ -32.67%
L1NativeTokenVault bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
getERC20Getters
initialize
transferFundsFromSharedBridge
+4,567 ❌
-22 ✅
+73 ❌
+784 ❌
-19 ✅
-6 ✅
+16.56%
-0.06%
+0.24%
+31.64%
-0.04%
-0.03%
TestCalldataDA processCalldataDA
processL2RollupDAValidatorOutputHash
-179 ✅
-52 ✅
-20.53%
-3.09%
DummyBridgehub baseTokenAssetId
setMessageRoot
+66 ❌
+35 ❌
+13.66%
+0.08%
GettersFacetWrapper facetAddress
facetFunctionSelectors
getPriorityQueueSize
isEthWithdrawalFinalized
isFacetFreezable
storedBatchHash
util_setAdmin
util_setBridgehub
util_setFacets
util_setL2BootloaderBytecodeHash
util_setL2LogsRootHash
util_setPendingAdmin
util_setPriorityTxMaxGasLimit
util_setStateTransitionManager
util_setTotalBatchesVerified
util_setTotalPriorityTxs
util_setVerifierParams
+87 ❌
+88 ❌
-22 ✅
-22 ✅
-22 ✅
-22 ✅
-22 ✅
+89 ❌
-22 ✅
-22 ✅
+89 ❌
-22 ✅
-22 ✅
+88 ❌
-22 ✅
-22 ✅
-22 ✅
+12.81%
+4.89%
-0.45%
-3.27%
-1.05%
-4.02%
-0.05%
+0.20%
-0.02%
-0.05%
+0.20%
-0.05%
-0.05%
+0.20%
-0.05%
-0.05%
-0.02%
DiamondProxy acceptAdmin
bridgehubRequestL2Transaction
changeFeeParams
executeUpgrade
setDAValidatorPair
setPendingAdmin
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
upgradeChainFromVersion
-3,888 ✅
-22 ✅
+37 ❌
+27,016 ❌
+22 ❌
-88 ✅
-22 ✅
+22 ❌
+14 ❌
+22 ❌
-22 ✅
-10.68%
-0.02%
+0.10%
+9.57%
+0.03%
-0.20%
-0.07%
+0.04%
+0.03%
+0.05%
-0.05%
L1ERC20Bridge claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
finalizeWithdrawal
initialize
isWithdrawalFinalized
+75 ❌
+3,691 ❌
-30 ✅
-21 ✅
+1,086 ❌
-22 ✅
+0.19%
+6.17%
-0.04%
-0.06%
+4.82%
-1.91%
TestExecutor commitBatches +2,035 ❌ +7.38%
RelayedSLDAValidator checkDA +1,884 ❌ +6.38%
Utils getGettersSelectors +109 ❌ +1.56%
DummyStateTransitionManagerForValidatorTimelock getHyperchain +22 ❌ +0.90%
DiamondCutTestContract diamondCut +1,270 ❌ +0.63%
DiamondInit initialize +2,358 ❌ +0.57%
ValidatorTimelock commitBatches
commitBatchesSharedBridge
executeBatches
executeBatchesSharedBridge
proveBatches
proveBatchesSharedBridge
revertBatches
revertBatchesSharedBridge
+18 ❌
+22 ❌
+8 ❌
+8 ❌
+11 ❌
+11 ❌
+11 ❌
+11 ❌
+0.03%
+0.04%
+0.02%
+0.02%
+0.03%
+0.03%
+0.04%
+0.04%
DummySharedBridge setDataToBeReturnedInFinalizeWithdrawal -22 ✅ -0.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
L1AssetRouter 4,210,539 (+114,362) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
initialize
legacyBridge
nativeTokenVault
pause
paused
setL1Erc20Bridge
setNativeTokenVault
transferTokenToNTV
unpause
14,218 (+22)
4,936 (+44)
10,288 (-7,907)
646 (+50)
702 (+22)
9,474 (-12,586)
663 (+22)
10,315 (+22)
10,746 (+46)
91,066 (+74)
45,482 (0)
392 (-23)
370 (-23)
25,743 (-43)
371 (-66)
4,794 (+22)
4,785 (+22)
2,618 (+22)
8,620 (-67)
+0.15%
+0.90%
-43.46%
+8.39%
+3.24%
-57.05%
+3.43%
+0.21%
+0.43%
+0.08%
0.00%
-5.54%
-5.85%
-0.17%
-15.10%
+0.46%
+0.46%
+0.85%
-0.77%
48,458 (+1,383)
19,565 (-2,082)
57,264 (-33,218)
56,121 (+1,613)
990 (+22)
53,917 (+900)
918 (+22)
112,210 (+59,281)
61,523 (+8)
99,880 (+56)
140,027 (-144)
677 (-23)
655 (-738)
25,743 (-43)
371 (-66)
24,395 (+115)
24,373 (+115)
9,402 (+21)
8,620 (-67)
+2.94%
-9.62%
-36.71%
+2.96%
+2.27%
+1.70%
+2.46%
+112.00%
+0.01%
+0.06%
-0.10%
-3.29%
-52.98%
-0.17%
-15.10%
+0.47%
+0.47%
+0.22%
-0.77%
47,671 (+1,383)
26,880 (+2,044)
58,833 (-2,012)
46,926 (-13,225)
702 (+22)
64,114 (+11,589)
663 (+22)
163,132 (+88,912)
68,054 (-8)
99,880 (+56)
141,224 (0)
392 (-23)
370 (-1,023)
25,743 (-43)
371 (-66)
24,891 (+22)
24,869 (+22)
10,129 (+22)
8,620 (-67)
+2.99%
+8.23%
-3.31%
-21.99%
+3.24%
+22.06%
+3.43%
+119.80%
-0.01%
+0.06%
0.00%
-5.54%
-73.44%
-0.17%
-15.10%
+0.09%
+0.09%
+0.22%
-0.77%
84,274 (+2,744)
26,880 (+44)
106,811 (-181,606)
122,082 (-1,307)
2,702 (+22)
84,266 (+1,136)
2,663 (+22)
163,185 (+88,909)
99,462 (-9)
108,695 (+38)
141,224 (0)
2,392 (-23)
2,370 (-23)
25,743 (-43)
371 (-66)
24,891 (+22)
24,869 (+22)
17,138 (+18)
8,620 (-67)
+3.37%
+0.16%
-62.97%
-1.06%
+0.82%
+1.37%
+0.83%
+119.70%
-0.01%
+0.03%
0.00%
-0.95%
-0.96%
-0.17%
-15.10%
+0.09%
+0.09%
+0.11%
-0.77%
4 (0)
3 (-2)
11 (-3)
9 (-5)
1,108 (-56)
9 (+1)
94 (0)
3 (0)
22 (0)
2 (0)
80 (-11)
7 (0)
7 (-19)
2 (0)
3 (0)
81 (-11)
81 (-11)
5 (0)
1 (0)
StateTransitionManager 3,971,934 (-153,512) createNewChain
initialize
l1GenesisUpgrade
protocolVersion
setChainCreationParams
setNewVersionUpgrade
setUpgradeDiamondCut
setValidatorTimelock
1,295 (+24)
22,836 (0)
426 (-22)
418 (+89)
45,213 (+211)
151,062 (+606)
46,685 (+211)
4,840 (-6,455)
+1.89%
0.00%
-4.91%
+27.05%
+0.47%
+0.40%
+0.45%
-57.15%
13,569 (-3,123,794)
111,736 (-29,846)
426 (-22)
1,418 (-22)
45,213 (+211)
151,062 (+606)
46,685 (+211)
8,078 (-3,217)
-99.57%
-21.08%
-4.91%
-1.53%
+0.47%
+0.40%
+0.45%
-28.48%
13,569 (-3,446,125)
22,836 (-186,501)
426 (-22)
1,418 (-911)
45,213 (+211)
151,062 (+606)
46,685 (+211)
8,078 (-3,217)
-99.61%
-89.09%
-4.91%
-39.12%
+0.47%
+0.40%
+0.45%
-28.48%
25,844 (-3,450,950)
209,526 (-13)
426 (-22)
2,418 (+89)
45,213 (+211)
151,062 (+606)
46,685 (+211)
11,317 (+22)
-99.26%
-0.01%
-4.91%
+3.82%
+0.47%
+0.40%
+0.45%
+0.19%
2 (-19)
21 (-1)
1 (0)
4 (-5)
1 (0)
1 (0)
1 (0)
2 (+1)
TransparentUpgradeableProxy 845,337 (+458) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
createNewChain
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
getERC20Getters
l1GenesisUpgrade
legacyBridge
nativeTokenVault
pause
paused
protocolVersion
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setNewVersionUpgrade
setUpgradeDiamondCut
setValidatorTimelock
tokenAddress
transferFundsFromSharedBridge
transferTokenToNTV
unpause
validatorTimelock
45,769 (+22)
34,170 (+44)
39,847 (-7,907)
30,029 (+50)
631 (0)
39,972 (-12,586)
54,673 (+134)
1,297 (+22)
39,992 (+22)
41,429 (+49)
114,008 (+74)
10,471 (+808)
1,054 (-22)
625 (0)
625 (0)
53,932 (-43)
999 (-66)
1,046 (+89)
29,012 (0)
97,606 (+334)
33,130 (+22)
33,127 (+22)
202,905 (+729)
98,187 (+334)
33,200 (-6,439)
0 (0)
37,521 (-22)
31,194 (+22)
32,009 (-67)
1,075 (0)
+0.05%
+0.13%
-16.56%
+0.17%
0.00%
-23.95%
+0.25%
+1.73%
+0.06%
+0.12%
+0.06%
+8.36%
-2.04%
0.00%
0.00%
-0.08%
-6.20%
+9.30%
0.00%
+0.34%
+0.07%
+0.07%
+0.36%
+0.34%
-16.24%
+∞%
-0.06%
+0.07%
-0.21%
0.00%
76,905 (+1,383)
48,790 (+44)
84,397 (-503)
80,529 (+4,833)
1,609 (+11)
77,594 (+230)
66,947 (-1,699)
2,466 (+19)
133,616 (+52,881)
88,706 (+8)
122,629 (+56)
10,471 (+808)
1,054 (-22)
2,033 (-20)
2,013 (-3,085)
53,932 (-43)
999 (-66)
5,296 (+1,784)
111,599 (-61)
97,606 (+334)
52,949 (-2)
52,927 (-2)
202,905 (+729)
98,187 (+334)
36,430 (-3,209)
176 (-1,166)
49,236 (-6)
31,194 (+22)
32,009 (-67)
5,950 (+625)
+1.83%
+0.09%
-0.59%
+6.38%
+0.69%
+0.30%
-2.48%
+0.78%
+65.50%
+0.01%
+0.05%
+8.36%
-2.04%
-0.97%
-60.51%
-0.08%
-6.20%
+50.80%
-0.05%
+0.34%
-0.00%
-0.00%
+0.36%
+0.34%
-8.10%
-86.89%
-0.01%
+0.07%
-0.21%
+11.74%
74,680 (+1,383)
56,101 (+44)
88,629 (-1,053)
76,293 (+1,473)
1,358 (0)
82,427 (+5,496)
66,947 (-1,699)
1,297 (+22)
180,396 (+79,312)
94,892 (-7)
122,629 (+56)
10,471 (+808)
1,054 (-22)
1,020 (-23)
998 (-23)
53,932 (-43)
999 (-66)
5,296 (+2,339)
110,694 (-36)
97,606 (+334)
53,451 (+22)
53,429 (+22)
202,905 (+729)
98,187 (+334)
36,430 (-3,209)
0 (0)
48,960 (0)
31,194 (+22)
32,009 (-67)
6,575 (+1,250)
+1.89%
+0.08%
-1.17%
+1.97%
0.00%
+7.14%
-2.48%
+1.73%
+78.46%
-0.01%
+0.05%
+8.36%
-2.04%
-2.21%
-2.25%
-0.08%
-6.20%
+79.10%
-0.03%
+0.34%
+0.04%
+0.04%
+0.36%
+0.34%
-8.10%
+∞%
0.00%
+0.07%
-0.21%
+23.47%
112,494 (+2,744)
56,101 (+44)
127,154 (+1,254)
121,160 (-1,045)
9,858 (0)
102,351 (+1,136)
79,222 (-3,532)
9,797 (+22)
180,461 (+79,309)
124,796 (-6)
131,251 (+38)
10,471 (+808)
1,054 (-22)
9,520 (-23)
9,498 (-23)
53,932 (-43)
999 (-66)
9,546 (+89)
113,550 (-36)
97,606 (+334)
53,451 (+22)
53,429 (+22)
202,905 (+729)
98,187 (+334)
39,661 (+22)
9,683 (0)
60,001 (-4)
31,194 (+22)
32,009 (-67)
9,575 (0)
+2.50%
+0.08%
+1.00%
-0.86%
0.00%
+1.12%
-4.27%
+0.23%
+78.41%
-0.00%
+0.03%
+8.36%
-2.04%
-0.24%
-0.24%
-0.08%
-6.20%
+0.94%
-0.03%
+0.34%
+0.04%
+0.04%
+0.36%
+0.34%
+0.06%
0.00%
-0.01%
+0.07%
-0.21%
0.00%
4 (0)
3 (0)
11 (-1)
9 (-1)
2,641 (-132)
9 (+1)
2 (0)
106 (0)
3 (0)
22 (0)
2 (0)
1 (-1)
1 (0)
8 (0)
8 (-19)
2 (0)
3 (0)
4 (-5)
159 (-8)
1 (0)
81 (-4)
81 (-4)
1 (0)
1 (0)
2 (+1)
55 (-26)
5 (0)
1 (0)
1 (0)
4 (+2)
AdminFacet 3,289,739 (+78,657) acceptAdmin
changeFeeParams
executeUpgrade
setDAValidatorPair
setPendingAdmin
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
upgradeChainFromVersion
2,412 (0)
4,742 (+22)
2,684 (-22)
50,114 (+22)
2,597 (-88)
2,564 (-22)
28,877 (+4,150)
2,686 (0)
2,793 (+22)
4,917 (-22)
0.00%
+0.47%
-0.81%
+0.04%
-3.28%
-0.85%
+16.78%
0.00%
+0.79%
-0.45%
6,558 (-5,954)
9,049 (+37)
345,509 (+47,049)
50,114 (+22)
14,382 (-8,942)
4,652 (-22)
28,877 (+1,623)
12,591 (+15)
12,771 (+22)
10,666 (-22)
-47.59%
+0.41%
+15.76%
+0.04%
-38.34%
-0.47%
+5.96%
+0.12%
+0.17%
-0.21%
6,558 (-6,947)
5,061 (+44)
550,011 (+76,612)
50,114 (+22)
14,382 (-9,874)
2,577 (-22)
28,877 (+22)
8,994 (+22)
9,211 (+22)
9,846 (-22)
-51.44%
+0.88%
+16.18%
+0.04%
-40.71%
-0.85%
+0.08%
+0.25%
+0.24%
-0.22%
10,705 (-2,800)
17,345 (+44)
552,761 (+79,312)
50,114 (+22)
26,168 (-88)
8,816 (-22)
28,877 (+22)
26,094 (+22)
26,311 (+22)
18,057 (-22)
-20.73%
+0.25%
+16.75%
+0.04%
-0.34%
-0.25%
+0.08%
+0.08%
+0.08%
-0.12%
2 (-12)
3 (0)
5 (0)
30 (0)
2 (-19)
3 (0)
30 (-19)
3 (0)
3 (0)
4 (0)
Governance 1,151,228 (0) owner 396 (0) 0.00% 896 (-662) -42.49% 396 (-2,000) -83.47% 2,396 (0) 0.00% 24 (-19)
MessageRoot 1,281,716 (-10,715) addNewChain 21,860 (-154,547) -87.61% 153,844 (-95,199) -38.23% 197,839 (-86,497) -30.42% 197,839 (-100,654) -33.72% 4 (-15)
MailboxFacet 3,008,460 (+68,824) bridgehubRequestL2Transaction 16,326 (-22) -0.13% 94,894 (-46,036) -32.67% 119,622 (-2,215) -1.82% 124,008 (-150,821) -54.88% 4 (-4)
L1NativeTokenVault 1,937,729 (+28,975) bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
getERC20Getters
initialize
registerToken
transferFundsFromSharedBridge
5,371 (-22)
7,498 (-22)
5,283 (+74)
3,262 (+784)
23,150 (+22)
484 (0)
8,945 (-22)
-0.41%
-0.29%
+1.42%
+31.64%
+0.10%
0.00%
-0.25%
32,153 (+4,567)
35,418 (-22)
30,650 (+73)
3,262 (+784)
49,986 (-19)
80,830 (-195)
21,718 (-6)
+16.56%
-0.06%
+0.24%
+31.64%
-0.04%
-0.24%
-0.03%
29,349 (-22)
29,576 (-22)
27,469 (+74)
3,262 (+784)
50,326 (+22)
82,362 (-36)
20,628 (0)
-0.07%
-0.07%
+0.27%
+31.64%
+0.04%
-0.04%
0.00%
71,494 (+18,476)
47,234 (-22)
45,242 (+74)
3,262 (+784)
50,326 (+22)
84,990 (-36)
33,568 (-4)
+34.85%
-0.05%
+0.16%
+31.64%
+0.04%
-0.04%
-0.01%
19 (-3)
14 (0)
9 (0)
1 (-1)
80 (-11)
191 (-13)
5 (0)
TestCalldataDA 482,724 (-7,355) processCalldataDA
processL2RollupDAValidatorOutputHash
682 (-181)
637 (0)
-20.97%
0.00%
693 (-179)
1,633 (-52)
-20.53%
-3.09%
682 (-181)
1,467 (0)
-20.97%
0.00%
2,495 (0)
2,802 (-131)
0.00%
-4.47%
260 (0)
5 (0)
DummyBridgehub 172,411 (+38,016) baseTokenAssetId
setMessageRoot
549 (+66)
43,866 (+35)
+13.66%
+0.08%
549 (+66)
43,866 (+35)
+13.66%
+0.08%
549 (+66)
43,866 (+35)
+13.66%
+0.08%
549 (+66)
43,866 (+35)
+13.66%
+0.08%
86 (0)
30 (0)
GettersFacetWrapper 1,710,995 (-18,387) facetAddress
facetFunctionSelectors
getPendingAdmin
getPriorityQueueSize
getTotalBatchesExecuted
getTotalBlocksVerified
isEthWithdrawalFinalized
isFacetFreezable
storedBatchHash
util_setAdmin
util_setBridgehub
util_setFacets
util_setL2BootloaderBytecodeHash
util_setL2LogsRootHash
util_setPendingAdmin
util_setPriorityTxMaxGasLimit
util_setStateTransitionManager
util_setTotalBatchesVerified
util_setTotalPriorityTxs
util_setVerifierParams
766 (+87)
1,889 (+88)
420 (-22)
4,879 (-22)
358 (-22)
359 (-22)
651 (-22)
1,407 (-22)
525 (-22)
44,001 (-22)
44,045 (+89)
128,426 (-22)
44,008 (-22)
44,273 (+89)
44,023 (-22)
43,650 (-22)
44,045 (+88)
43,732 (-22)
45,878 (-22)
89,376 (-22)
+12.81%
+4.89%
-4.98%
-0.45%
-5.79%
-5.77%
-3.27%
-1.54%
-4.02%
-0.05%
+0.20%
-0.02%
-0.05%
+0.20%
-0.05%
-0.05%
+0.20%
-0.05%
-0.05%
-0.02%
766 (+87)
1,889 (+88)
420 (-22)
4,879 (-22)
358 (-22)
359 (-22)
651 (-22)
2,081 (-22)
525 (-22)
44,001 (-22)
44,045 (+89)
128,426 (-22)
44,008 (-22)
44,273 (+89)
44,023 (-22)
43,650 (-22)
44,045 (+88)
43,732 (-22)
45,878 (-22)
89,376 (-22)
+12.81%
+4.89%
-4.98%
-0.45%
-5.79%
-5.77%
-3.27%
-1.05%
-4.02%
-0.05%
+0.20%
-0.02%
-0.05%
+0.20%
-0.05%
-0.05%
+0.20%
-0.05%
-0.05%
-0.02%
766 (+87)
1,889 (+88)
420 (-22)
4,879 (-22)
358 (-22)
359 (-22)
651 (-22)
2,081 (-22)
525 (-22)
44,001 (-22)
44,045 (+89)
128,426 (-22)
44,008 (-22)
44,273 (+89)
44,023 (-22)
43,650 (-22)
44,045 (+88)
43,732 (-22)
45,878 (-22)
89,376 (-22)
+12.81%
+4.89%
-4.98%
-0.45%
-5.79%
-5.77%
-3.27%
-1.05%
-4.02%
-0.05%
+0.20%
-0.02%
-0.05%
+0.20%
-0.05%
-0.05%
+0.20%
-0.05%
-0.05%
-0.02%
766 (+87)
1,889 (+88)
420 (-22)
4,879 (-22)
358 (-22)
359 (-22)
651 (-22)
2,755 (-22)
525 (-22)
44,001 (-22)
44,045 (+89)
128,426 (-22)
44,008 (-22)
44,273 (+89)
44,023 (-22)
43,650 (-22)
44,045 (+88)
43,732 (-22)
45,878 (-22)
89,376 (-22)
+12.81%
+4.89%
-4.98%
-0.45%
-5.79%
-5.77%
-3.27%
-0.79%
-4.02%
-0.05%
+0.20%
-0.02%
-0.05%
+0.20%
-0.05%
-0.05%
+0.20%
-0.05%
-0.05%
-0.02%
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
2 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
2 (0)
1 (0)
1 (0)
DiamondProxy 2,456,702 (+18) acceptAdmin
bridgehubRequestL2Transaction
changeFeeParams
commitBatches
executeUpgrade
setDAValidatorPair
setPendingAdmin
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
upgradeChainFromVersion
30,766 (0)
48,038 (-22)
34,086 (+22)
0 (0)
31,872 (-22)
79,194 (+22)
31,322 (-88)
31,080 (-22)
57,501 (+22)
31,411 (0)
31,667 (+22)
34,251 (-22)
0.00%
-0.05%
+0.06%
+∞%
-0.07%
+0.03%
-0.28%
-0.07%
+0.04%
0.00%
+0.07%
-0.06%
32,501 (-3,888)
124,499 (-22)
38,387 (+37)
32,731 (+958)
309,332 (+27,016)
79,194 (+22)
43,098 (-88)
33,157 (-22)
57,501 (+22)
41,303 (+14)
40,027 (+22)
40,000 (-22)
-10.68%
-0.02%
+0.10%
+3.02%
+9.57%
+0.03%
-0.20%
-0.07%
+0.04%
+0.03%
+0.05%
-0.05%
32,501 (-4,536)
148,524 (-22)
34,402 (+44)
0 (0)
468,572 (+43,591)
79,194 (+22)
43,098 (-88)
31,097 (-22)
57,501 (+22)
37,700 (+22)
33,251 (+22)
39,179 (-22)
-12.25%
-0.01%
+0.13%
+∞%
+10.26%
+0.03%
-0.20%
-0.07%
+0.04%
+0.06%
+0.07%
-0.06%
34,237 (-2,800)
152,910 (-22)
46,673 (+44)
90,739 (+2,256)
470,772 (+45,741)
79,194 (+22)
54,874 (-88)
37,294 (-22)
57,501 (+22)
54,800 (+22)
55,163 (+22)
47,391 (-22)
-7.56%
-0.01%
+0.09%
+2.55%
+10.76%
+0.03%
-0.16%
-0.06%
+0.04%
+0.04%
+0.04%
-0.05%
2 (-12)
4 (0)
3 (0)
34 (0)
5 (0)
30 (0)
2 (0)
3 (0)
30 (0)
3 (0)
3 (0)
4 (0)
L1ERC20Bridge 1,116,643 (+13,804) claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
finalizeWithdrawal
initialize
isWithdrawalFinalized
l2TokenBeacon
l2TokenProxyBytecodeHash
31,389 (+45)
27,946 (+45)
28,120 (-22)
30,285 (-22)
23,625 (+1,244)
559 (-22)
425 (+66)
328 (-22)
+0.14%
+0.16%
-0.08%
-0.07%
+5.56%
-3.79%
+18.38%
-6.29%
38,734 (+75)
63,490 (+3,691)
72,795 (-30)
36,837 (-21)
23,625 (+1,086)
1,130 (-22)
925 (+66)
828 (-22)
+0.19%
+6.17%
-0.04%
-0.06%
+4.82%
-1.91%
+7.68%
-2.59%
41,519 (+49)
77,866 (+4,993)
78,499 (-11)
37,597 (-11)
23,625 (+1,244)
559 (-22)
425 (+66)
328 (-22)
+0.12%
+6.85%
-0.01%
-0.03%
+5.56%
-3.79%
+18.38%
-6.29%
42,558 (+49)
94,818 (+366)
94,622 (-44)
40,312 (0)
23,625 (-22)
2,559 (-22)
2,425 (+66)
2,328 (-22)
+0.12%
+0.39%
-0.05%
0.00%
-0.09%
-0.85%
+2.80%
-0.94%
6 (0)
12 (0)
6 (0)
6 (0)
1 (-7)
7 (0)
4 (0)
4 (0)
TestExecutor 2,784,639 (+45,417) commitBatches 8,058 (0) 0.00% 29,625 (+2,035) +7.38% 29,172 (+2,138) +7.91% 45,851 (+2,256) +5.17% 16 (0)
RelayedSLDAValidator 631,088 (+39,986) checkDA 27,723 (+1,054) +3.95% 31,398 (+1,884) +6.38% 29,802 (+2,750) +10.17% 38,265 (+3,442) +9.88% 4 (+1)
TestnetERC20Token 640,463 (0) allowance
approve
balanceOf
mint
845 (0)
24,284 (0)
0 (0)
34,043 (0)
0.00%
0.00%
+∞%
0.00%
2,586 (-116)
45,950 (-11)
1,396 (+14)
52,589 (+63)
-4.29%
-0.02%
+1.01%
+0.12%
2,845 (0)
46,196 (0)
559 (0)
51,143 (0)
0.00%
0.00%
0.00%
0.00%
2,845 (0)
46,196 (0)
2,559 (0)
68,615 (0)
0.00%
0.00%
0.00%
0.00%
31 (+3)
170 (-8)
52 (+4)
351 (-16)
Utils 4,727,171 (+35,250) getGettersSelectors 7,082 (+109) +1.56% 7,082 (+109) +1.56% 7,082 (+109) +1.56% 7,082 (+109) +1.56% 19 (+3)
DummyStateTransitionManagerForValidatorTimelock 187,067 (+28,786) getHyperchain 2,465 (+22) +0.90% 2,465 (+22) +0.90% 2,465 (+22) +0.90% 2,465 (+22) +0.90% 13 (0)
DiamondCutTestContract 1,830,140 (-18,399) diamondCut 23,712 (0) 0.00% 203,584 (+1,270) +0.63% 45,091 (0) 0.00% 1,422,517 (+25,403) +1.82% 20 (0)
DiamondInit 568,496 (0) initialize 22,660 (0) 0.00% 414,290 (+2,358) +0.57% 424,331 (+66) +0.02% 446,731 (+66) +0.01% 90 (-22)
ValidatorTimelock 1,145,809 (+12) commitBatches
commitBatchesSharedBridge
executeBatches
executeBatchesSharedBridge
proveBatches
proveBatchesSharedBridge
revertBatches
revertBatchesSharedBridge
29,772 (0)
62,803 (+22)
26,138 (0)
26,305 (0)
28,056 (0)
28,132 (0)
23,926 (0)
24,071 (0)
0.00%
+0.04%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
56,086 (+18)
62,803 (+22)
32,629 (+8)
32,798 (+8)
33,176 (+11)
33,220 (+11)
28,952 (+11)
29,097 (+11)
+0.03%
+0.04%
+0.02%
+0.02%
+0.03%
+0.03%
+0.04%
+0.04%
62,662 (+22)
62,803 (+22)
30,779 (0)
30,946 (0)
33,176 (+11)
33,220 (+11)
28,952 (+11)
29,097 (+11)
+0.04%
+0.04%
0.00%
0.00%
+0.03%
+0.03%
+0.04%
+0.04%
62,674 (+22)
62,803 (+22)
40,970 (+22)
41,143 (+22)
38,296 (+22)
38,309 (+22)
33,979 (+22)
34,124 (+22)
+0.04%
+0.04%
+0.05%
+0.05%
+0.06%
+0.06%
+0.06%
+0.06%
5 (0)
3 (0)
3 (0)
3 (0)
2 (0)
2 (0)
2 (0)
2 (0)
DummySharedBridge 870,094 (+45,412) setDataToBeReturnedInFinalizeWithdrawal 88,830 (-22) -0.02% 88,830 (-22) -0.02% 88,830 (-22) -0.02% 88,830 (-22) -0.02% 1 (0)
DummyHyperchain 3,204,231 (+68,730)
DummyStateTransitionManager 3,992,214 (-142,451)
IncrementalMerkleTest 340,232 (-12)
PriorityTreeTest 923,959 (-12)
GettersFacet 887,287 (-18,374)
DefaultUpgrade 1,587,031 (+12)
UtilsFacet 675,694 (+12)

Copy link

Coverage after merging sb-reduce-owner-footprint-on-genesis into sync-layer-stable will be

88.73%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../da-contracts/contracts
   RollupL1DAValidator.sol67.11%50%83.33%73.91%134, 137, 137, 137, 139, 170, 172, 25, 25, 25–26, 26, 26, 28, 30–31, 35–36, 59, 61, 61, 61–62, 64
contracts/bridge
   BridgeHelper.sol100%100%100%100%
   L1AssetRouter.sol95.19%89.29%94.87%97.88%137, 152, 209, 229, 274, 327, 379, 514, 531, 552, 735–736, 871
   L1ERC20Bridge.sol100%100%100%100%
   L1NativeTokenVault.sol96.12%97.62%84.62%97.30%252, 257, 45
contracts/bridgehub
   Bridgehub.sol72.94%44.30%83.33%86.43%103, 109, 114, 114, 153, 181, 181–182, 184–185, 185, 185–186, 192–193, 193, 193–194, 194, 194, 196–197, 197, 197–198, 262, 292–294, 296–298, 300, 328, 382–383, 385, 385, 385, 428, 436–437, 440, 440, 440–441, 463, 501, 525–526, 605, 608–609, 613–614, 641–642, 647–648, 676, 681, 93, 98
   MessageRoot.sol91.38%61.54%100%100%156, 162, 69, 76, 94
   STMDeploymentTracker.sol79.49%50%90%94.12%110, 114, 31, 38, 61, 88, 91
contracts/common
   ReentrancyGuard.sol100%100%100%100%
contracts/common/libraries
   DataEncoding.sol80%100%100%66.67%72, 80
   DynamicIncrementalMerkle.sol74.42%100%80%72.22%67–70, 72–74, 76–78
   FullMerkle.sol100%100%100%100%
   L2ContractHelper.sol55.88%30%60%68.42%29, 32–33, 46–47, 47, 47, 49, 49, 49, 56, 86, 90
   Merkle.sol73.85%68.18%75%76.92%52–53, 53, 53–54, 54, 54–55, 55, 55, 57–59, 62, 65, 83
   MessageHashing.sol100%100%100%100%
   SemVer.sol100%100%100%100%
   UncheckedMath.sol100%100%100%100%
   UnsafeBytes.sol100%100%100%100%
contracts/governance
   ChainAdmin.sol22.22%20%33.33%20%16, 28–29, 38, 38, 38, 40, 42–43, 43, 46, 49
   Governance.sol99.07%96.77%100%100%44
contracts/state-transition
   StateTransitionManager.sol72.67%51.52%58.82%85.11%103, 130–132, 136, 189, 232, 239, 257, 263, 270, 282, 289, 296, 304, 311, 319, 326, 339, 341, 407, 426, 429, 444, 449, 468, 73, 78, 84, 84
   TestnetVerifier.sol77.78%66.67%100%75%16, 32
   ValidatorTimelock.sol98.57%100%100%97.67%236
   Verifier.sol89.88%35.71%96.30%90.93%1673–1674, 287–302, 305–308, 311–318, 321–328, 331–332, 335–336, 339, 384–385, 395–396, 406–407, 417–418, 428–429, 444–445, 454, 454–455, 904–905
contracts/state-transition/chain-deps
   DiamondInit.sol88.24%70%100%100%33–37, 63
   DiamondProxy.sol80.77%62.50%100%88.24%16, 16, 16–17, 27
contracts/state-transition/chain-deps/facets
   Admin.sol81.61%54.35%86.36%92.45%107, 119, 119, 119–121, 147, 147, 147–148, 148, 148, 150, 171, 218–219, 221, 234–235, 241, 260–261, 266, 303, 313, 317, 39, 39, 95
   Executor.sol78.44%72.81%81.25%81.61%107, 167, 171–172, 172, 172–173, 173, 173, 184, 184, 188, 188, 188, 206, 220, 231, 234, 279, 279, 279, 282, 285, 287–288, 294–295, 314–317, 319, 36, 368, 368, 368–371, 373, 376, 379–380, 389, 405, 408–409, 411–413, 424–426, 446, 487, 494, 513, 518, 527–528, 579, 604–605
   Getters.sol83.19%66.67%84.09%84.85%104, 107, 113, 116, 127, 130, 172, 223, 229, 233, 64, 79, 84
   Mailbox.sol57.87%47.22%57.14%61.40%107, 115, 131–132, 132, 132, 134–135, 143–145, 156, 167–168, 170–171, 173, 178, 182, 182–184, 184, 184–185, 188, 188, 188, 191, 193–194, 196, 201, 203, 206–207, 212–215, 218–219, 236, 242, 242, 242, 250, 255, 282, 311–312, 389, 400, 406, 52, 52, 545, 545, 545–546, 566, 75, 85
   ZkSyncHyperchainBase.sol82.14%78.57%85.71%85.71%48, 56, 56, 56
contracts/state-transition/data-availability
   CalldataDA.sol100%100%100%100%
   CalldataDAGateway.sol85.71%66.67%100%100%27–28
   RelayedSLDAValidator.sol96.67%83.33%100%100%94
contracts/state-transition/libraries
   Diamond.sol94.81%86.49%100%97.73%110, 112, 114, 116, 119, 184, 294
   LibMap.sol100%100%100%100%
   PriorityQueue.sol100%100%100%100%
   PriorityTree.sol</

@StanislavBreadless StanislavBreadless merged commit a91bc7a into sync-layer-stable Aug 20, 2024
23 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-reduce-owner-footprint-on-genesis branch August 20, 2024 09:06
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