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

add ability to recover from failed migration #715

Merged
merged 17 commits into from
Aug 29, 2024

Conversation

koloz193
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.

Copy link

github-actions bot commented Aug 19, 2024

Changes to gas cost

Generated at commit: d44aa3d8d48b2556382f71525fed8e1bec16fefc, compared to commit: 95c501b4e2ea4927f1170740543b844606102c6a

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
TransparentUpgradeableProxy bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
createNewChain
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
legacyBridge
nativeTokenVault
setChainCreationParams
setL1Erc20Bridge
setPendingAdmin
setUpgradeDiamondCut
setValidatorTimelock
+32 ❌
-27 ✅
+2,865 ❌
+3,433 ❌
+256 ❌
-1,468 ✅
+10 ❌
+8 ❌
+3,760 ❌
+22 ❌
+2,387 ❌
+1,110 ❌
-22 ✅
-40 ✅
+12 ❌
-22 ✅
-43 ✅
+0.04%
-0.06%
+3.39%
+4.26%
+16.38%
-1.89%
+0.01%
+0.01%
+4.24%
+0.02%
+117.41%
+55.14%
-0.02%
-0.08%
+0.02%
-0.02%
-0.12%
L1AssetRouter bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
claimFailedDeposit
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
initialize
setL1Erc20Bridge
+34 ❌
-24 ✅
+3,114 ❌
+4,058 ❌
-2,133 ✅
+11 ❌
+4,324 ❌
+22 ❌
-98 ✅
-40 ✅
+0.07%
-0.12%
+5.44%
+7.23%
-3.95%
+0.01%
+7.03%
+0.02%
-0.07%
-0.16%
L1NativeTokenVault bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
initialize
+3,125 ❌
-11 ✅
+395 ❌
-29 ✅
+9.71%
-0.03%
+1.29%
-0.06%
DiamondProxy acceptAdmin
bridgehubRequestL2Transaction
changeFeeParams
executeBatchesSharedBridge
executeUpgrade
finalizeEthWithdrawal
freezeDiamond
functionWithOnlyAdminModifier
functionWithOnlyAdminOrStateTransitionManagerModifier
functionWithOnlyBridgehubModifier
functionWithOnlyStateTransitionManagerModifier
functionWithOnlyValidatorModifier
l2TransactionBaseCost
proveBatchesSharedBridge
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
requestL2Transaction
setPendingAdmin
setPorterAvailability
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
unfreezeDiamond
upgradeChainFromVersion
-27 ✅
-3 ✅
-46 ✅
-50 ✅
-38 ✅
+119 ❌
-72 ✅
-28 ✅
-28 ✅
-24 ✅
-39 ✅
-24 ✅
+5 ❌
-39 ✅
+60 ❌
+14 ❌
+45 ❌
-23 ✅
-38 ✅
-34 ✅
-63 ✅
-10 ✅
-25 ✅
-33 ✅
-93 ✅
-6 ✅
-0.08%
-0.00%
-0.12%
-0.13%
-0.01%
+0.16%
-0.20%
-0.09%
-0.09%
-0.08%
-0.13%
-0.08%
+0.05%
-0.09%
+0.81%
+0.22%
+0.50%
-0.02%
-0.09%
-0.09%
-0.19%
-0.02%
-0.06%
-0.08%
-0.30%
-0.01%
L1ERC20Bridge claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
finalizeWithdrawal
initialize
-2,179 ✅
-24 ✅
-47 ✅
-45 ✅
-72 ✅
-5.24%
-0.04%
-0.06%
-0.13%
-0.30%
AdminFacet acceptAdmin
changeFeeParams
executeUpgrade
freezeDiamond
setPendingAdmin
setPorterAvailability
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
unfreezeDiamond
upgradeChainFromVersion
-21 ✅
-39 ✅
-36 ✅
-59 ✅
-32 ✅
-27 ✅
-51 ✅
-10 ✅
-21 ✅
-27 ✅
-75 ✅
+2 ❌
-0.32%
-0.43%
-0.01%
-0.76%
-0.22%
-0.22%
-1.10%
-0.03%
-0.17%
-0.21%
-2.93%
+0.02%
DummyBridgehubSetter acceptAdmin
addStateTransitionManager
initialize
removeStateTransitionManager
setPendingAdmin
-14 ✅
+11 ❌
-72 ✅
-26 ✅
+30 ❌
-0.04%
+0.03%
-0.30%
-0.10%
+0.07%
MailboxFacet bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
requestL2Transaction
0 ➖
+126 ❌
+5 ❌
+60 ❌
+17 ❌
+47 ❌
-12 ✅
0.00%
+0.26%
+0.11%
+1.38%
+0.50%
+0.91%
-0.01%
MerkleTest calculateRoot(bytes32[],bytes32[],uint256,bytes32[])
calculateRoot(bytes32[],uint256,bytes32)
-7 ✅
+38 ❌
-0.13%
+1.31%
TestBaseFacet functionWithOnlyAdminModifier
functionWithOnlyAdminOrStateTransitionManagerModifier
functionWithOnlyBridgehubModifier
functionWithOnlyStateTransitionManagerModifier
functionWithOnlyValidatorModifier
-22 ✅
-19 ✅
-18 ✅
-30 ✅
-18 ✅
-0.95%
-0.48%
-0.76%
-1.25%
-0.73%
GettersFacetWrapper isFunctionFreezable -10 ✅ -1.17%
TestExecutor commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
-263 ✅
-44 ✅
-33 ✅
-0.89%
-0.54%
-0.40%
PriorityQueueTest front
popFront
-36 ✅
-8 ✅
-0.72%
-0.02%
StateTransitionManager createNewChain
initialize
setChainCreationParams
setPendingAdmin
setUpgradeDiamondCut
setValidatorTimelock
+15 ❌
-38 ✅
-22 ✅
+12 ❌
-22 ✅
-39 ✅
+0.11%
-0.03%
-0.05%
+0.04%
-0.05%
-0.48%
Governance cancel
execute
executeInstant
updateDelay
updateSecurityCouncil
-14 ✅
-21 ✅
-39 ✅
-93 ✅
-82 ✅
-0.06%
-0.06%
-0.09%
-0.43%
-0.38%
DiamondInit initialize -1,094 ✅ -0.28%
Utils encodePacked +23 ❌ +0.12%
ValidatorTimelock addValidator
commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
removeValidator
revertBatchesSharedBridge
setStateTransitionManager
-1 ✅
-13 ✅
-38 ✅
-41 ✅
-28 ✅
-55 ✅
+33 ❌
-0.00%
-0.02%
-0.12%
-0.12%
-0.09%
-0.20%
+0.07%
DiamondCutTestContract diamondCut +17 ❌ +0.01%
PriorityTreeTest processBatch +2 ❌ +0.01%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
TransparentUpgradeableProxy 846,950 (+12) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
createNewChain
depositHappened
depositLegacyErc20Bridge
encodeTxDataHash
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
legacyBridge
nativeTokenVault
registerToken
setChainCreationParams
setL1Erc20Bridge
setNativeTokenVault
setPendingAdmin
setUpgradeDiamondCut
setValidatorTimelock
tokenAddress
transferFundsFromSharedBridge
45,784 (+15)
34,089 (-81)
39,780 (-67)
29,968 (-61)
1,258 (+627)
39,925 (-47)
55,469 (-70)
1,297 (0)
39,966 (-26)
2,735 (0)
41,349 (-80)
113,903 (+22)
1,020 (+395)
998 (+373)
29,012 (0)
98,745 (-22)
33,087 (-43)
33,127 (0)
57,012 (+12)
99,337 (-22)
33,145 (-77)
0 (0)
37,433 (0)
+0.03%
-0.24%
-0.17%
-0.20%
+99.37%
-0.12%
-0.13%
0.00%
-0.07%
0.00%
-0.19%
+0.02%
+63.20%
+59.68%
0.00%
-0.02%
-0.13%
0.00%
+0.02%
-0.02%
-0.23%
+∞%
0.00%
76,948 (+32)
48,763 (-27)
87,289 (+2,865)
83,983 (+3,433)
1,819 (+256)
76,143 (-1,468)
68,072 (+10)
3,061 (+595)
133,641 (+8)
5,627 (-108)
92,422 (+3,760)
122,524 (+22)
4,420 (+2,387)
3,123 (+1,110)
111,601 (-43)
98,745 (-22)
52,909 (-40)
52,887 (-40)
57,012 (+12)
99,337 (-22)
36,409 (-43)
190 (+14)
49,132 (-16)
+0.04%
-0.06%
+3.39%
+4.26%
+16.38%
-1.89%
+0.01%
+24.13%
+0.01%
-1.88%
+4.24%
+0.02%
+117.41%
+55.14%
-0.04%
-0.02%
-0.08%
-0.08%
+0.02%
-0.02%
-0.12%
+7.95%
-0.03%
74,725 (+34)
56,101 (0)
92,303 (+3,652)
81,094 (+4,775)
1,336 (0)
78,082 (-4,367)
68,072 (+10)
1,297 (0)
180,447 (+25)
7,235 (0)
105,052 (+10,150)
122,524 (+22)
1,020 (0)
998 (0)
110,739 (0)
98,745 (-22)
53,451 (0)
53,429 (0)
57,012 (+12)
99,337 (-22)
36,409 (-43)
0 (0)
48,872 (0)
+0.05%
0.00%
+4.12%
+6.26%
0.00%
-5.30%
+0.01%
0.00%
+0.01%
0.00%
+10.70%
+0.02%
0.00%
0.00%
0.00%
-0.02%
0.00%
0.00%
+0.02%
-0.02%
-0.12%
+∞%
0.00%
112,559 (+43)
56,101 (0)
127,225 (0)
121,188 (+8)
9,836 (0)
102,416 (+43)
80,676 (+90)
9,797 (0)
180,512 (+25)
7,235 (0)
124,851 (-92)
131,146 (+22)
9,520 (0)
9,498 (0)
113,595 (0)
98,745 (-22)
53,451 (0)
53,429 (0)
57,012 (+12)
99,337 (-22)
39,673 (-10)
9,716 (0)
59,913 (0)
+0.04%
0.00%
0.00%
+0.01%
0.00%
+0.04%
+0.11%
0.00%
+0.01%
0.00%
-0.07%
+0.02%
0.00%
0.00%
0.00%
-0.02%
0.00%
0.00%
+0.02%
-0.02%
-0.03%
0.00%
0.00%
4 (0)
3 (0)
10 (-1)
8 (-1)
1,259 (-1,382)
8 (-1)
2 (0)
53 (-53)
3 (0)
14 (-1)
19 (-3)
2 (0)
5 (-3)
4 (-4)
147 (-12)
1 (0)
75 (-6)
75 (-6)
2 (0)
1 (0)
2 (0)
51 (-4)
5 (0)
L1AssetRouter 4,045,571 (-160,646) bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
encodeTxDataHash
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
initialize
legacyBridge
nativeTokenVault
setAssetHandlerAddressThisChain
setL1Erc20Bridge
setNativeTokenVault
14,242 (+24)
4,864 (-72)
10,230 (-58)
594 (-52)
702 (0)
9,436 (-38)
663 (0)
10,298 (-17)
2,071 (0)
10,678 (-68)
90,961 (+22)
45,410 (-72)
392 (0)
370 (0)
7,650 (0)
4,763 (-31)
4,785 (0)
+0.17%
-1.46%
-0.56%
-8.05%
0.00%
-0.40%
0.00%
-0.16%
0.00%
-0.63%
+0.02%
-0.16%
0.00%
0.00%
0.00%
-0.65%
0.00%
48,503 (+34)
19,541 (-24)
60,405 (+3,114)
60,201 (+4,058)
1,207 (+217)
51,801 (-2,133)
1,078 (+160)
112,239 (+11)
4,963 (-108)
65,802 (+4,324)
99,775 (+22)
139,929 (-98)
1,192 (+515)
870 (+215)
49,165 (-22)
24,355 (-40)
24,333 (-40)
+0.07%
-0.12%
+5.44%
+7.23%
+21.92%
-3.95%
+17.43%
+0.01%
-2.13%
+7.03%
+0.02%
-0.07%
+76.07%
+32.82%
-0.04%
-0.16%
-0.16%
47,716 (+34)
26,880 (0)
62,561 (+3,706)
51,725 (+4,773)
702 (0)
53,681 (-10,455)
663 (0)
163,183 (+25)
6,571 (0)
81,695 (+13,631)
99,775 (+22)
141,224 (0)
392 (0)
370 (0)
49,450 (0)
24,891 (0)
24,869 (0)
+0.07%
0.00%
+6.30%
+10.17%
0.00%
-16.30%
0.00%
+0.02%
0.00%
+20.03%
+0.02%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
84,339 (+43)
26,880 (0)
106,882 (0)
122,117 (+9)
2,702 (0)
84,331 (+43)
2,663 (0)
163,236 (+25)
6,571 (0)
99,363 (+28)
108,590 (+22)
141,224 (0)
2,392 (0)
2,370 (0)
49,450 (0)
24,891 (0)
24,869 (0)
+0.05%
0.00%
0.00%
+0.01%
0.00%
+0.05%
0.00%
+0.02%
0.00%
+0.03%
+0.02%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
4 (0)
3 (0)
10 (-1)
8 (-1)
586 (-522)
8 (-1)
53 (-41)
3 (0)
14 (-1)
19 (-3)
2 (0)
74 (-6)
5 (-2)
4 (-3)
147 (-12)
75 (-6)
75 (-6)
L1NativeTokenVault 1,864,950 (-89,431) bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
chainBalance
initialize
registerToken
transferFundsFromSharedBridge
5,321 (-72)
7,446 (-72)
5,248 (-57)
624 (0)
23,100 (-72)
466 (-18)
8,857 (0)
-1.34%
-0.96%
-1.07%
0.00%
-0.31%
-3.72%
0.00%
35,302 (+3,125)
35,371 (-11)
31,067 (+395)
1,069 (+177)
49,979 (-29)
80,531 (-196)
21,616 (-14)
+9.71%
-0.03%
+1.29%
+19.84%
-0.06%
-0.24%
-0.06%
29,302 (-69)
29,531 (0)
36,332 (+8,841)
624 (0)
50,348 (0)
82,407 (0)
20,540 (0)
-0.23%
0.00%
+32.16%
0.00%
0.00%
0.00%
0.00%
71,520 (0)
47,189 (0)
45,279 (+15)
2,624 (0)
50,348 (0)
85,035 (0)
33,480 (0)
0.00%
0.00%
+0.03%
0.00%
0.00%
0.00%
0.00%
17 (-2)
14 (0)
8 (-1)
673 (-541)
74 (-6)
183 (-12)
5 (0)
DiamondProxy 2,428,645 (-2,338) acceptAdmin
bridgehubRequestL2Transaction
changeFeeParams
commitBatchesSharedBridge
executeBatchesSharedBridge
executeUpgrade
finalizeEthWithdrawal
freezeDiamond
functionWithOnlyAdminModifier
functionWithOnlyAdminOrStateTransitionManagerModifier
functionWithOnlyBridgehubModifier
functionWithOnlyStateTransitionManagerModifier
functionWithOnlyValidatorModifier
l2TransactionBaseCost
proveBatchesSharedBridge
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
requestL2Transaction
setPendingAdmin
setPorterAvailability
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
unfreezeDiamond
upgradeChainFromVersion
util_setChainId
30,711 (-55)
34,233 (-49)
34,007 (-79)
0 (0)
39,753 (-50)
31,759 (-113)
37,779 (-102)
30,740 (-100)
30,593 (0)
30,641 (+9)
30,637 (0)
30,659 (0)
30,753 (0)
8,324 (-100)
42,862 (-39)
4,259 (+60)
4,529 (+60)
5,035 (+60)
33,295 (-102)
31,246 (-76)
31,073 (-100)
30,980 (-100)
57,491 (-10)
31,335 (-76)
31,570 (-97)
30,741 (-100)
34,172 (-79)
29,011 (0)
-0.18%
-0.14%
-0.23%
+∞%
-0.13%
-0.35%
-0.27%
-0.32%
0.00%
+0.03%
0.00%
0.00%
0.00%
-1.19%
-0.09%
+1.43%
+1.34%
+1.21%
-0.31%
-0.24%
-0.32%
-0.32%
-0.02%
-0.24%
-0.31%
-0.32%
-0.23%
0.00%
32,474 (-27)
106,452 (-3)
38,341 (-46)
34,731 (+1,950)
39,753 (-50)
289,669 (-38)
76,666 (+119)
36,022 (-72)
30,627 (-28)
32,279 (-28)
30,677 (-24)
30,699 (-39)
30,793 (-24)
9,706 (+5)
42,862 (-39)
7,474 (+60)
6,486 (+14)
8,995 (+45)
130,195 (-23)
43,060 (-38)
39,183 (-34)
33,094 (-63)
57,491 (-10)
41,278 (-25)
39,994 (-33)
30,825 (-93)
39,994 (-6)
33,856 (-14)
-0.08%
-0.00%
-0.12%
+5.95%
-0.13%
-0.01%
+0.16%
-0.20%
-0.09%
-0.09%
-0.08%
-0.13%
-0.08%
+0.05%
-0.09%
+0.81%
+0.22%
+0.50%
-0.02%
-0.09%
-0.09%
-0.19%
-0.02%
-0.06%
-0.08%
-0.30%
-0.01%
-0.04%
32,474 (-27)
148,551 (+27)
34,333 (-69)
21,361 (+21,361)
39,753 (-50)
437,296 (-17)
77,027 (+15)
30,813 (-95)
30,627 (-28)
32,812 (-27)
30,677 (-24)
30,699 (-39)
30,793 (-24)
9,709 (+5)
42,862 (-39)
7,474 (+60)
5,838 (-9)
8,314 (+60)
167,108 (-21)
43,060 (-38)
32,283 (0)
31,010 (-87)
57,491 (-10)
37,700 (0)
33,251 (0)
30,867 (-90)
39,234 (+55)
33,823 (0)
-0.08%
+0.02%
-0.20%
+∞%
-0.13%
-0.00%
+0.02%
-0.31%
-0.09%
-0.08%
-0.08%
-0.13%
-0.08%
+0.05%
-0.09%
+0.81%
-0.15%
+0.73%
-0.01%
-0.09%
0.00%
-0.28%
-0.02%
0.00%
0.00%
-0.29%
+0.14%
0.00%
34,237 (0)
152,937 (+27)
46,685 (+12)
90,781 (-65)
39,753 (-50)
437,346 (-17)
77,303 (+3)
51,723 (0)
30,662 (-55)
32,852 (-67)
30,717 (-49)
30,739 (-79)
30,833 (-49)
9,709 (+5)
42,862 (-39)
10,690 (+60)
11,040 (+60)
13,893 (+15)
191,247 (+27)
54,874 (0)
54,195 (0)
37,294 (0)
57,491 (-10)
54,800 (0)
55,163 (0)
30,867 (-90)
47,335 (-56)
34,195 (0)
0.00%
+0.02%
+0.03%
-0.07%
-0.13%
-0.00%
+0.00%
0.00%
-0.18%
-0.20%
-0.16%
-0.26%
-0.16%
+0.05%
-0.09%
+0.56%
+0.55%
+0.11%
+0.01%
0.00%
0.00%
0.00%
-0.02%
0.00%
0.00%
-0.29%
-0.12%
0.00%
2 (0)
5 (0)
3 (0)
30 (-4)
1 (0)
5 (0)
257 (0)
4 (0)
2 (0)
4 (0)
2 (0)
2 (0)
2 (0)
516 (0)
1 (0)
2 (0)
6 (0)
6 (0)
771 (0)
2 (0)
3 (0)
3 (0)
26 (-4)
3 (0)
3 (0)
3 (0)
4 (0)
519 (0)
L1ERC20Bridge 1,109,528 (-7,115) claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
finalizeWithdrawal
initialize
30,958 (-10,092)
27,897 (-49)
28,071 (-49)
30,238 (-47)
23,553 (-72)
-24.58%
-0.18%
-0.17%
-0.16%
-0.30%
39,424 (-2,179)
63,232 (-24)
72,276 (-47)
35,556 (-45)
23,553 (-72)
-5.24%
-0.04%
-0.06%
-0.13%
-0.30%
41,158 (-436)
77,801 (-65)
78,435 (-64)
37,075 (-63)
23,553 (-72)
-1.05%
-0.08%
-0.08%
-0.17%
-0.30%
42,113 (-61)
94,784 (-46)
91,810 (+23)
38,116 (-61)
23,553 (-72)
-0.14%
-0.05%
+0.03%
-0.16%
-0.30%
5 (+1)
12 (0)
6 (0)
6 (0)
1 (0)
AdminFacet 3,135,845 (-152,838) acceptAdmin
changeFeeParams
executeUpgrade
freezeDiamond
setPendingAdmin
setPorterAvailability
setPriorityTxMaxGasLimit
setTokenMultiplier
setTransactionFilterer
setValidator
unfreezeDiamond
upgradeChainFromVersion
2,369 (-43)
4,672 (-70)
2,580 (-104)
2,398 (-82)
2,533 (-64)
2,588 (-82)
2,492 (-72)
28,867 (-10)
2,622 (-64)
2,711 (-82)
2,399 (-82)
4,847 (-70)
-1.78%
-1.48%
-3.87%
-3.31%
-2.46%
-3.07%
-2.81%
-0.03%
-2.38%
-2.94%
-3.31%
-1.42%
6,537 (-21)
9,010 (-39)
307,393 (-36)
7,680 (-59)
14,350 (-32)
12,307 (-27)
4,601 (-51)
28,867 (-10)
12,570 (-21)
12,744 (-27)
2,487 (-75)
10,668 (+2)
-0.32%
-0.43%
-0.01%
-0.76%
-0.22%
-0.22%
-1.10%
-0.03%
-0.17%
-0.21%
-2.93%
+0.02%
6,537 (-21)
5,001 (-60)
488,344 (-17)
2,465 (-77)
14,350 (-32)
8,617 (0)
2,495 (-82)
28,867 (-10)
8,994 (0)
9,211 (0)
2,531 (-72)
9,906 (+60)
-0.32%
-1.19%
-0.00%
-3.03%
-0.22%
0.00%
-3.18%
-0.03%
0.00%
0.00%
-2.77%
+0.61%
10,705 (0)
17,357 (+12)
488,394 (-17)
23,391 (0)
26,168 (0)
25,717 (0)
8,816 (0)
28,867 (-10)
26,094 (0)
26,311 (0)
2,531 (-72)
18,013 (-44)
0.00%
+0.07%
-0.00%
0.00%
0.00%
0.00%
0.00%
-0.03%
0.00%
0.00%
-2.77%
-0.24%
2 (0)
3 (0)
5 (0)
4 (0)
2 (0)
3 (0)
3 (0)
26 (-4)
3 (0)
3 (0)
3 (0)
4 (0)
DummyBridgehubSetter 4,062,177 (+31,789) acceptAdmin
addStateTransitionManager
initialize
proveL1ToL2TransactionStatus
proveL2LogInclusion
removeStateTransitionManager
setPendingAdmin
23,456 (-43)
23,879 (0)
24,165 (-72)
0 (0)
0 (0)
23,855 (0)
26,003 (-31)
-0.18%
0.00%
-0.30%
+∞%
+∞%
0.00%
-0.12%
39,080 (-14)
41,155 (+11)
24,165 (-72)
1,436 (+23)
1,551 (-6)
25,485 (-26)
41,662 (+30)
-0.04%
+0.03%
-0.30%
+1.63%
-0.39%
-0.10%
+0.07%
46,892 (0)
47,605 (+35)
24,165 (-72)
997 (+6)
1,139 (0)
25,855 (-10)
49,685 (+47)
0.00%
+0.07%
-0.30%
+0.61%
0.00%
-0.04%
+0.09%
46,892 (0)
47,605 (+35)
24,165 (-72)
3,651 (+7)
3,951 (+7)
26,267 (-55)
49,901 (+47)
0.00%
+0.07%
-0.30%
+0.19%
+0.18%
-0.21%
+0.09%
768 (0)
3,584 (0)
17 (0)
512 (0)
512 (0)
2,048 (0)
1,280 (0)
MailboxFacet 3,004,796 (-93,694) bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
requestL2Transaction
2,527 (-43)
8,251 (-90)
3,034 (-85)
3,434 (+60)
1,730 (-69)
4,198 (+60)
3,249 (-90)
-1.67%
-1.08%
-2.73%
+1.78%
-3.84%
+1.45%
-2.70%
76,429 (0)
49,338 (+126)
4,417 (+5)
4,402 (+60)
3,396 (+17)
5,235 (+47)
100,386 (-12)
0.00%
+0.26%
+0.11%
+1.38%
+0.50%
+0.91%
-0.01%
119,649 (+27)
49,747 (+3)
4,420 (+5)
4,402 (+60)
3,723 (+60)
5,118 (+41)
136,099 (+27)
+0.02%
+0.01%
+0.11%
+1.38%
+1.64%
+0.81%
+0.02%
124,035 (+27)
49,747 (+3)
4,420 (+5)
5,371 (+60)
5,703 (+60)
6,540 (+21)
162,736 (+27)
+0.02%
+0.01%
+0.11%
+1.13%
+1.06%
+0.32%
+0.02%
5 (0)
257 (0)
516 (0)
2 (0)
6 (0)
6 (0)
771 (0)
MerkleTest 442,717 (-25,501) calculateRoot(bytes32[],bytes32[],uint256,bytes32[])
calculateRoot(bytes32[],uint256,bytes32)
1,120 (-11)
571 (-35)
-0.97%
-5.78%
5,315 (-7)
2,930 (+38)
-0.13%
+1.31%
1,460 (+5)
2,982 (+39)
+0.34%
+1.33%
13,154 (+3)
3,037 (+39)
+0.02%
+1.30%
8 (0)
265 (0)
TestBaseFacet 169,019 (-73,721) functionWithOnlyAdminModifier
functionWithOnlyAdminOrStateTransitionManagerModifier
functionWithOnlyBridgehubModifier
functionWithOnlyStateTransitionManagerModifier
functionWithOnlyValidatorModifier
2,261 (0)
2,309 (+9)
2,305 (0)
2,327 (0)
2,421 (0)
0.00%
+0.39%
0.00%
0.00%
0.00%
2,290 (-22)
3,942 (-19)
2,340 (-18)
2,362 (-30)
2,456 (-18)
-0.95%
-0.48%
-0.76%
-1.25%
-0.73%
2,290 (-22)
4,475 (-18)
2,340 (-18)
2,362 (-30)
2,456 (-18)
-0.95%
-0.40%
-0.76%
-1.25%
-0.73%
2,320 (-43)
4,510 (-49)
2,375 (-37)
2,397 (-61)
2,491 (-37)
-1.82%
-1.07%
-1.53%
-2.48%
-1.46%
2 (0)
4 (0)
2 (0)
2 (0)
2 (0)
GettersFacetWrapper 1,740,191 (-1,716) isFunctionFreezable 735 (-21) -2.78% 842 (-10) -1.17% 842 (-10) -1.17% 949 (0) 0.00% 2 (0)
TestExecutor 2,446,316 (-105,280) commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
7,997 (-33)
8,100 (-44)
8,149 (-33)
-0.41%
-0.54%
-0.40%
29,334 (-263)
8,100 (-44)
8,149 (-33)
-0.89%
-0.54%
-0.40%
29,486 (+342)
8,100 (-44)
8,149 (-33)
+1.17%
-0.54%
-0.40%
45,803 (-20)
8,100 (-44)
8,149 (-33)
-0.04%
-0.54%
-0.40%
15 (-1)
1 (0)
1 (0)
PriorityQueueTest 287,033 (-9,292) front
popFront
4,646 (-72)
25,666 (-61)
-1.53%
-0.24%
4,967 (-36)
32,878 (-8)
-0.72%
-0.02%
4,967 (-36)
31,322 (0)
-0.72%
0.00%
5,288 (0)
48,652 (0)
0.00%
0.00%
2 (0)
15 (0)
StateTransitionManager 3,855,383 (-112,269) createNewChain
initialize
setChainCreationParams
setPendingAdmin
setUpgradeDiamondCut
setValidatorTimelock
1,141 (-64)
22,764 (-72)
45,757 (-22)
28,452 (+12)
47,228 (-22)
4,794 (-68)
-5.31%
-0.32%
-0.05%
+0.04%
-0.05%
-1.40%
13,743 (+15)
111,967 (-38)
45,757 (-22)
28,452 (+12)
47,228 (-22)
8,061 (-39)
+0.11%
-0.03%
-0.05%
+0.04%
-0.05%
-0.48%
13,743 (+15)
22,764 (-72)
45,757 (-22)
28,452 (+12)
47,228 (-22)
8,061 (-39)
+0.11%
-0.32%
-0.05%
+0.04%
-0.05%
-0.48%
26,345 (+93)
210,092 (0)
45,757 (-22)
28,452 (+12)
47,228 (-22)
11,329 (-10)
+0.35%
0.00%
-0.05%
+0.04%
-0.05%
-0.09%
2 (0)
21 (0)
1 (0)
2 (0)
1 (0)
2 (0)
Governance 987,208 (-164,020) cancel
execute
executeInstant
scheduleTransparent
updateDelay
updateSecurityCouncil
23,719 (0)
27,429 (-67)
25,251 (-61)
25,479 (0)
21,536 (-93)
21,671 (-82)
0.00%
-0.24%
-0.24%
0.00%
-0.43%
-0.38%
25,327 (-14)
37,903 (-21)
41,662 (-39)
53,547 (-5)
21,536 (-93)
21,671 (-82)
-0.06%
-0.06%
-0.09%
-0.01%
-0.43%
-0.38%
25,754 (0)
39,322 (+18)
39,331 (+9)
56,207 (0)
21,536 (-93)
21,671 (-82)
0.00%
+0.05%
+0.02%
0.00%
-0.43%
-0.38%
26,042 (-66)
58,878 (+18)
59,915 (-81)
63,412 (0)
21,536 (-93)
21,671 (-82)
-0.25%
+0.03%
-0.14%
0.00%
-0.43%
-0.38%
5 (0)
28 (0)
8 (0)
35 (0)
3 (0)
3 (0)
TestnetERC20Token 640,427 (0) approve
mint
24,284 (0)
34,043 (0)
0.00%
0.00%
45,807 (-143)
52,647 (+150)
-0.31%
+0.29%
46,196 (0)
51,143 (0)
0.00%
0.00%
46,196 (0)
68,615 (0)
0.00%
0.00%
159 (-11)
326 (-23)
DiamondInit 462,884 (-60,410) initialize 22,599 (-61) -0.27% 391,192 (-1,094) -0.28% 400,752 (0) 0.00% 420,652 (0) 0.00% 104 (-4)
Utils 4,636,441 (-91,530) constructRollupL2DAValidatorOutputHash
encodePacked
1,475 (0)
19,972 (+1,365)
0.00%
+7.34%
1,481 (-4)
19,972 (+23)
-0.27%
+0.12%
1,475 (0)
19,972 (0)
0.00%
0.00%
1,633 (0)
19,972 (0)
0.00%
0.00%
25 (-5)
52 (-8)
ValidatorTimelock 917,759 (-19,250) addValidator
commitBatchesSharedBridge
executeBatchesSharedBridge
proveBatchesSharedBridge
removeValidator
revertBatchesSharedBridge
setStateTransitionManager
29,466 (-82)
29,850 (-82)
26,212 (-93)
27,989 (-82)
29,488 (-82)
23,977 (-82)
24,036 (0)
-0.28%
-0.27%
-0.35%
-0.29%
-0.28%
-0.34%
0.00%
52,492 (-1)
57,333 (-13)
32,760 (-38)
33,154 (-41)
30,928 (-28)
27,364 (-55)
44,570 (+33)
-0.00%
-0.02%
-0.12%
-0.12%
-0.09%
-0.20%
+0.07%
53,404 (0)
62,828 (0)
30,927 (-19)
33,154 (-41)
31,528 (0)
23,989 (-82)
46,139 (+35)
0.00%
0.00%
-0.06%
-0.12%
0.00%
-0.34%
+0.08%
53,404 (0)
62,840 (0)
41,143 (0)
38,320 (0)
31,770 (0)
34,127 (0)
46,139 (+35)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
+0.08%
50 (0)
6 (0)
3 (0)
2 (0)
3 (0)
3 (0)
25 (0)
DiamondCutTestContract 1,824,527 (-40,338) diamondCut 23,669 (-72) -0.30% 203,623 (+17) +0.01% 45,131 (+17) +0.04% 1,422,579 (+15) +0.00% 20 (0)
PriorityTreeTest 907,980 (-15,991) processBatch 22,615 (0) 0.00% 36,582 (+2) +0.01% 35,487 (+3) +0.01% 52,742 (+3) +0.01% 4 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,739 (+1) +0.00% 33,193 (0) 0.00% 33,215 (0) 0.00% 277 (0)
MessageRoot 1,277,004 (-4,712)
DummyBridgehub 172,435 (+12)
DummyHyperchain 3,213,574 (-93,628)
DummyStateTransitionManager 3,875,614 (-112,314)
TransactionFiltererTrue 146,027 (-12)
IncrementalMerkleTest 340,244 (+12)
GettersFacet 920,162 (-1,728)
DefaultUpgrade 1,332,845 (-254,186)
GenerateForceDeploymentsData 1,251,217 (+1,296)
TestFacet 78,531 (+12)

@koloz193 koloz193 requested a review from Deniallugo as a code owner August 21, 2024 18:50
@koloz193 koloz193 requested a review from kelemeno August 22, 2024 14:57
Base automatically changed from kl/sync-layer-reorg to sync-layer-stable August 27, 2024 16:09
Copy link

Coverage after merging zk-recover-failed-chain-migration into sync-layer-stable will be

87.55%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../da-contracts/contracts
   RollupL1DAValidator.sol61.04%31.25%83.33%67.27%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, 80, 80–81
contracts/bridge
   BridgeHelper.sol100%100%100%100%
   L1AssetRouter.sol93.91%84.85%94.87%96.62%139–140, 155–156, 216, 236, 285, 338, 390, 550, 571, 613, 731–732, 753–754, 895
   L1ERC20Bridge.sol97.50%100%100%96.55%116
   L1NativeTokenVault.sol92.42%93.33%78.57%94.32%177–178, 258, 286, 291, 46–47
contracts/bridgehub
   Bridgehub.sol67.13%35.14%81.08%77.53%107, 107, 107, 112, 118, 123, 152–153, 196, 196–197, 199–200, 200, 200–201, 207–208, 208, 208–209, 209, 209, 211–212, 212, 212–213, 221–222, 236–237, 284–285, 315–316, 318–319, 321–323, 325–326, 329–330, 336, 338–339, 341–342, 369–370, 380–381, 384, 412, 436–438, 441, 441–442, 486, 494–496, 500, 500–501, 503, 517–518, 530–531, 570, 594–595, 674, 677–678, 682–683, 710–711, 716–717, 764, 769
   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.sol90%66.67%100%92.86%78–79
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.sol47.06%0%60%54.17%100, 104, 29–30, 35–36, 39–40, 54, 56, 56–57, 61, 61–62, 70
   Merkle.sol96.61%90.91%100%97.67%80–81
   MessageHashing.sol100%100%100%100%
   SemVer.sol100%100%100%100%
   UncheckedMath.sol100%100%100%100%
   UnsafeBytes.sol100%100%100%100%
contracts/governance
   ChainAdmin.sol17.86%0%20%21.05%27–28, 39–40, 47–48, 56, 56–57, 60, 62–63, 63, 66, 69, 78, 78–79, 81
   Governance.sol98.15%94.74%100%98.55%44–45
contracts/state-transition
   StateTransitionManager.sol66.88%33.33%58.82%77.45%108, 137–138, 140–141, 143–144, 146–147, 202–203, 247, 254, 272, 278, 285, 297, 304, 311, 319, 326, 334, 341, 359, 361, 426, 445, 445, 445, 448, 448, 448, 450, 463, 468, 493, 74, 87–88
   TestnetVerifier.sol77.78%66.67%100%75%16, 32
   ValidatorTimelock.sol95.38%83.33%100%95.45%210, 83–84
   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.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.sol81.52%48.78%90.91%90.91%104–105, 115–116, 130, 130–131, 133–134, 157, 157, 157–158, 158, 158, 160, 239, 241, 254–255, 261, 280–281, 286, 322, 324, 328, 337, 347, 351, 40, 40
   Executor.sol78.32%64.94%92.86%81.37%119–120, 201, 207–208, 208–209, 211, 211–212, 224, 224, 228, 228, 228, 252–253, 270, 273, 319, 319–320, 324, 328, 330–331, 337–338, 357–360, 362, 37, 418, 418, 418–421, 423, 426, 429–430, 447, 450–451, 453–455, 468–470, 531–532, 540–541, 563–564, 574–575, 626–627, 653–654
   Getters.sol81.82%62.50%82.22%83.82%110, 113, 119, 122, 133, 136, 178, 231, 237, 241, 65, 70, 85, 90
   Mailbox.sol82.27%70.59%89.66%83.57%153, 188, 198, 207–208, 233, 237, 237, 237, 240, 242–243, 245, 250, 252, 255–257, 262–265, 267–268, 274, 274, 274, 276, 279–280, 374–375, 54
   ZkSyncHyperchainBase.sol71.43%71.43%71.43%71.43%55, 55–56, 62, 62–63
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.sol93.33%80.77%100%95.96%109–110, 113, 115, 117, 120, 198–199, 316
   LibMap.sol100%100%100%100%
   PriorityQueue.sol100%100%100%100%
   PriorityTree.sol97.62%80%100%100%80
   TransactionValidator.sol94.44%88.24%100%96%66–67, 69–70
contracts/upgrades
   

@koloz193 koloz193 merged commit 3301a13 into sync-layer-stable Aug 29, 2024
23 checks passed
@koloz193 koloz193 deleted the zk-recover-failed-chain-migration branch August 29, 2024 15:44
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