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

Custom Asset Bridging after OZ fixes were applied (#679) #682

Merged
merged 13 commits into from
Aug 9, 2024

Conversation

Raid5594
Copy link
Collaborator

@Raid5594 Raid5594 commented Aug 7, 2024

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.

Co-authored-by: Raid Ateir <ra@matterlabs.dev>
Co-authored-by: kelemeno <34402761+kelemeno@users.noreply.github.com>
Co-authored-by: Kalman Lajko <kl@matterlabs.dev>
@Raid5594 Raid5594 requested a review from Deniallugo as a code owner August 8, 2024 12:20
@Raid5594 Raid5594 changed the base branch from sync-layer-stable to kl/sync-layer-reorg August 9, 2024 09:00
Copy link

github-actions bot commented Aug 9, 2024

Changes to gas cost

Generated at commit: 458fbebb57fdc5f2e0c1ef406af71996850136db, compared to commit: e6cd619db7c6e722d7dd5af9d1122ea8fe1ce6df

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
TransparentUpgradeableProxy acceptOwnership
addToken
assetHandlerAddress
baseToken
bridgeMint
bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
forwardTransactionOnGateway
getERC20Getters
getHyperchain
l2TransactionBaseCost
legacyBridge
nativeTokenVault
owner
pause
paused
pendingOwner
registerToken
requestL2TransactionDirect
setAssetHandlerAddressOnCounterPart
setL1Erc20Bridge
sharedBridge
stateTransitionManagerIsRegistered
stmAssetId
stmAssetIdToAddress
tokenIsRegistered
transferFundsFromSharedBridge
transferTokenToNTV
unpause
+11 ❌
+1,035 ❌
-495 ✅
-22 ✅
-44 ✅
+1,398 ❌
+44 ❌
-638 ✅
+4,838 ❌
+232 ❌
+10 ❌
+52,899 ❌
+45 ❌
+63 ❌
-22 ✅
+808 ❌
+9 ❌
-22 ✅
-30 ✅
-3,016 ✅
-8 ✅
+44 ❌
-88 ✅
+22 ❌
-27 ✅
+1,495 ❌
+38 ❌
+10 ❌
-22 ✅
-22 ✅
-22 ✅
-22 ✅
+109 ❌
+6 ❌
+22 ❌
-67 ✅
+0.03%
+1.93%
-28.55%
-0.69%
-0.00%
+1.85%
+0.09%
-0.75%
+6.39%
+0.30%
+0.41%
+65.52%
+0.05%
+0.05%
-0.02%
+8.36%
+0.21%
-0.06%
-1.46%
-59.16%
-0.29%
+0.08%
-8.26%
+2.02%
-0.02%
+0.56%
+0.09%
+0.02%
-1.07%
-1.77%
-1.58%
-1.88%
+1.57%
+0.01%
+0.07%
-0.21%
L1AssetRouter acceptOwnership
assetHandlerAddress
bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
pause
setAssetHandlerAddressInitial
setAssetHandlerAddressOnCounterPart
setL1Erc20Bridge
transferTokenToNTV
unpause
+44 ❌
-109 ✅
+1,398 ❌
+44 ❌
+4,170 ❌
+4,413 ❌
+11 ❌
+903 ❌
+11 ❌
+59,299 ❌
+46 ❌
+63 ❌
+44 ❌
-856 ✅
+38 ❌
+9 ❌
+32 ❌
-67 ✅
+0.37%
-15.20%
+2.97%
+0.20%
+4.62%
+8.10%
+1.14%
+1.70%
+1.23%
+112.03%
+0.07%
+0.06%
+0.17%
-1.74%
+0.36%
+0.04%
+0.34%
-0.77%
L1NativeTokenVault bridgeBurn
bridgeMint
bridgeRecoverFailedTransfer
getERC20Getters
initialize
transferFundsFromSharedBridge
+4,715 ❌
-22 ✅
+73 ❌
+784 ❌
+15 ❌
+6 ❌
+17.09%
-0.06%
+0.24%
+31.64%
+0.03%
+0.03%
STMDeploymentTracker registerSTMAssetOnL1 -22,029 ✅ -28.70%
Bridgehub acceptAdmin
acceptOwnership
addStateTransitionManager
addToken
baseToken
bridgeBurn
bridgeMint
createNewChain
forwardTransactionOnGateway
getHyperchain
l2TransactionBaseCost
registerSettlementLayer
removeStateTransitionManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setAssetHandlerAddressInitial
setPendingAdmin
stateTransitionManager
stateTransitionManagerIsRegistered
stmAssetId
stmAssetIdToAddress
tokenIsRegistered
-22 ✅
+182 ❌
+801 ❌
-989 ✅
-22 ✅
-44 ✅
-44 ✅
-9,932 ✅
-22 ✅
+22 ❌
-22 ✅
+22 ❌
+285 ❌
+1,495 ❌
+9,942 ❌
+89 ❌
-22 ✅
+112 ❌
-22 ✅
-22 ✅
-22 ✅
-22 ✅
+245 ❌
-0.05%
+0.86%
+1.99%
-2.65%
-0.86%
-0.03%
-0.00%
-0.26%
-0.03%
+1.07%
-0.82%
+0.09%
+1.13%
+0.62%
+1.83%
+0.13%
-0.09%
+0.30%
-2.19%
-1.72%
-2.90%
-4.06%
+19.41%
L1ERC20Bridge claimFailedDeposit
deposit(address,address,uint256,uint256,uint256)
deposit(address,address,uint256,uint256,uint256,address)
finalizeWithdrawal
initialize
isWithdrawalFinalized
+75 ❌
+3,691 ❌
-30 ✅
-25 ✅
-22 ✅
-22 ✅
+0.19%
+6.17%
-0.04%
-0.07%
-0.10%
-1.91%
GatewayScript moveChainToGateway
registerGateway
registerL2Contracts
+14,187 ❌
+22 ❌
+1,429 ❌
+1.33%
+0.03%
+0.30%
DeployL1Script run +210,342 ❌ +0.44%
RegisterHyperchainScript run -11,174 ✅ -0.15%
StateTransitionManager forwardedBridgeBurn
forwardedBridgeMint
registerSettlementLayer
-22 ✅
-22 ✅
+22 ❌
-0.08%
-0.00%
+0.06%
DummySharedBridge setDataToBeReturnedInFinalizeWithdrawal -22 ✅ -0.02%
DummyStateTransitionManagerWBH setHyperchain +1 ❌ +0.00%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) 0 ➖ 0.00%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
TransparentUpgradeableProxy 845,337 (0) acceptOwnership
addToken
assetHandlerAddress
baseToken
bridgeMint
bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
forwardTransactionOnGateway
getERC20Getters
getHyperchain
l2TransactionBaseCost
legacyBridge
nativeTokenVault
owner
pause
paused
pendingOwner
registerToken
requestL2TransactionDirect
setAssetHandlerAddressOnCounterPart
setL1Erc20Bridge
setNativeTokenVault
sharedBridge
stateTransitionManagerIsRegistered
stmAssetId
stmAssetIdToAddress
tokenAddress
tokenIsRegistered
transferFundsFromSharedBridge
transferTokenToNTV
unpause
35,460 (+44)
54,627 (+1,035)
1,239 (+611)
3,173 (-22)
3,720,453 (-44)
45,798 (+51)
34,170 (+44)
39,728 (-8,026)
30,029 (+44)
631 (0)
40,001 (-12,557)
1,286 (+11)
39,992 (+22)
41,451 (+44)
114,015 (+81)
113,352 (-22)
10,471 (+808)
1,434 (0)
39,284 (-22)
625 (0)
625 (0)
1,036 (+43)
54,019 (+44)
977 (-88)
1,113 (+22)
29,012 (0)
268,838 (+1,495)
34,881 (+44)
33,130 (+22)
33,105 (0)
1,032 (-22)
1,220 (-22)
1,367 (-22)
1,151 (-22)
0 (0)
3,308 (+109)
37,521 (-22)
31,194 (+22)
32,009 (-67)
+0.12%
+1.93%
+97.29%
-0.69%
-0.00%
+0.11%
+0.13%
-16.81%
+0.15%
0.00%
-23.89%
+0.86%
+0.06%
+0.11%
+0.07%
-0.02%
+8.36%
0.00%
-0.06%
0.00%
0.00%
+4.33%
+0.08%
-8.26%
+2.02%
0.00%
+0.56%
+0.13%
+0.07%
0.00%
-2.09%
-1.77%
-1.58%
-1.88%
+∞%
+3.41%
-0.06%
+0.07%
-0.21%
35,482 (+11)
54,627 (+1,035)
1,239 (-495)
3,173 (-22)
3,720,453 (-44)
76,920 (+1,398)
48,790 (+44)
84,262 (-638)
80,535 (+4,838)
1,603 (+5)
77,596 (+232)
2,457 (+10)
133,634 (+52,899)
88,745 (+45)
122,636 (+63)
113,352 (-22)
10,471 (+808)
4,257 (+9)
39,284 (-22)
2,023 (-30)
2,082 (-3,016)
2,720 (-8)
54,019 (+44)
977 (-88)
1,113 (+22)
111,633 (-27)
268,838 (+1,495)
40,339 (+38)
52,961 (+10)
52,917 (-12)
2,032 (-22)
1,220 (-22)
1,367 (-22)
1,151 (-22)
2,984 (+1,642)
7,050 (+109)
49,248 (+6)
31,194 (+22)
32,009 (-67)
+0.03%
+1.93%
-28.55%
-0.69%
-0.00%
+1.85%
+0.09%
-0.75%
+6.39%
+0.31%
+0.30%
+0.41%
+65.52%
+0.05%
+0.05%
-0.02%
+8.36%
+0.21%
-0.06%
-1.46%
-59.16%
-0.29%
+0.08%
-8.26%
+2.02%
-0.02%
+0.56%
+0.09%
+0.02%
-0.02%
-1.07%
-1.77%
-1.58%
-1.88%
+122.35%
+1.57%
+0.01%
+0.07%
-0.21%
35,482 (+11)
54,627 (+1,035)
1,239 (+33)
3,173 (-22)
3,720,453 (-44)
74,695 (+1,398)
56,101 (+44)
88,510 (-1,172)
76,293 (+1,473)
1,358 (0)
82,428 (+5,497)
1,286 (+11)
180,423 (+79,339)
94,943 (+44)
122,636 (+63)
113,352 (-22)
10,471 (+808)
3,118 (+22)
39,284 (-22)
1,009 (-34)
1,076 (+55)
3,070 (-22)
54,019 (+44)
977 (-88)
1,113 (+22)
110,716 (-14)
268,838 (+1,495)
40,339 (+38)
53,451 (+22)
53,407 (0)
2,032 (-22)
1,220 (-22)
1,367 (-22)
1,151 (-22)
0 (0)
9,808 (+109)
48,960 (0)
31,194 (+22)
32,009 (-67)
+0.03%
+1.93%
+2.74%
-0.69%
-0.00%
+1.91%
+0.08%
-1.31%
+1.97%
0.00%
+7.15%
+0.86%
+78.49%
+0.05%
+0.05%
-0.02%
+8.36%
+0.71%
-0.06%
-3.26%
+5.39%
-0.71%
+0.08%
-8.26%
+2.02%
-0.01%
+0.56%
+0.09%
+0.04%
0.00%
-1.07%
-1.77%
-1.58%
-1.88%
+∞%
+1.12%
0.00%
+0.07%
-0.21%
35,504 (-22)
54,627 (+1,035)
1,239 (-8,467)
3,173 (-22)
3,720,453 (-44)
112,495 (+2,745)
56,101 (+44)
127,019 (+1,119)
121,213 (-992)
9,858 (0)
102,352 (+1,137)
9,786 (+11)
180,488 (+79,336)
124,847 (+45)
131,258 (+45)
113,352 (-22)
10,471 (+808)
22,618 (+22)
39,284 (-22)
9,509 (-34)
9,576 (+55)
9,613 (0)
54,019 (+44)
977 (-88)
1,113 (+22)
113,572 (-14)
268,838 (+1,495)
45,798 (+33)
53,451 (+22)
53,407 (0)
3,032 (-22)
1,220 (-22)
1,367 (-22)
1,151 (-22)
9,683 (0)
9,808 (+109)
60,030 (+25)
31,194 (+22)
32,009 (-67)
-0.06%
+1.93%
-87.23%
-0.69%
-0.00%
+2.50%
+0.08%
+0.89%
-0.81%
0.00%
+1.12%
+0.11%
+78.43%
+0.04%
+0.03%
-0.02%
+8.36%
+0.10%
-0.06%
-0.36%
+0.58%
0.00%
+0.08%
-8.26%
+2.02%
-0.01%
+0.56%
+0.07%
+0.04%
0.00%
-0.72%
-1.77%
-1.58%
-1.88%
0.00%
+1.12%
+0.04%
+0.07%
-0.21%
14 (0)
14 (0)
7 (-8)
2 (0)
3 (0)
4 (0)
3 (0)
11 (-1)
9 (-1)
2,707 (-66)
9 (+1)
106 (0)
3 (0)
22 (0)
2 (0)
1 (0)
1 (-1)
79 (0)
3 (0)
8 (0)
8 (-19)
46 (0)
2 (0)
3 (0)
7 (0)
163 (-4)
1 (0)
2 (0)
83 (-2)
83 (-2)
6 (0)
7 (0)
7 (0)
7 (0)
80 (-1)
33 (0)
5 (0)
1 (0)
1 (0)
L1AssetRouter 4,220,982 (+115,123) acceptOwnership
assetHandlerAddress
bridgeRecoverFailedTransfer
bridgehubConfirmL2Transaction
bridgehubDeposit
bridgehubDepositBaseToken
chainBalance
claimFailedDeposit
depositHappened
depositLegacyErc20Bridge
finalizeWithdrawal
finalizeWithdrawalLegacyErc20Bridge
initialize
legacyBridge
nativeTokenVault
owner
pause
paused
setAssetHandlerAddressInitial
setAssetHandlerAddressOnCounterPart
setL1Erc20Bridge
setNativeTokenVault
transferTokenToNTV
unpause
12,071 (+44)
608 (+33)
14,247 (+51)
4,936 (+44)
10,169 (-8,026)
646 (+44)
691 (+11)
9,503 (-12,557)
652 (+11)
10,315 (+22)
10,768 (+44)
91,073 (+81)
45,482 (0)
381 (-34)
448 (+55)
420 (+55)
25,830 (+44)
349 (-88)
7,672 (+22)
5,051 (+44)
4,794 (+22)
4,763 (0)
2,618 (+22)
8,620 (-67)
+0.37%
+5.74%
+0.36%
+0.90%
-44.11%
+7.31%
+1.62%
-56.92%
+1.72%
+0.21%
+0.41%
+0.09%
0.00%
-8.19%
+13.99%
+15.07%
+0.17%
-20.14%
+0.29%
+0.88%
+0.46%
0.00%
+0.85%
-0.77%
12,071 (+44)
608 (-109)
48,473 (+1,398)
21,691 (+44)
94,492 (+4,170)
58,922 (+4,413)
979 (+11)
53,920 (+903)
907 (+11)
112,228 (+59,299)
61,562 (+46)
99,887 (+63)
140,148 (-23)
666 (-34)
733 (-660)
420 (+55)
25,830 (+44)
349 (-88)
48,286 (-856)
10,514 (+38)
24,289 (+9)
24,245 (-13)
9,413 (+32)
8,620 (-67)
+0.37%
-15.20%
+2.97%
+0.20%
+4.62%
+8.10%
+1.14%
+1.70%
+1.23%
+112.03%
+0.07%
+0.06%
-0.02%
-4.86%
-47.38%
+15.07%
+0.17%
-20.14%
-1.74%
+0.36%
+0.04%
-0.05%
+0.34%
-0.77%
12,071 (+44)
608 (+33)
47,686 (+1,398)
24,880 (+44)
66,171 (+5,326)
65,209 (+5,058)
691 (+11)
64,115 (+11,590)
652 (+11)
163,159 (+88,939)
68,105 (+43)
99,887 (+63)
141,224 (0)
381 (-34)
448 (-945)
420 (+55)
25,830 (+44)
349 (-88)
49,472 (+22)
10,514 (+38)
24,891 (+22)
24,847 (0)
10,129 (+22)
8,620 (-67)
+0.37%
+5.74%
+3.02%
+0.18%
+8.75%
+8.41%
+1.62%
+22.07%
+1.72%
+119.83%
+0.06%
+0.06%
0.00%
-8.19%
-67.84%
+15.07%
+0.17%
-20.14%
+0.04%
+0.36%
+0.09%
0.00%
+0.22%
-0.77%
12,071 (+44)
608 (-1,967)
84,275 (+2,745)
26,880 (+44)
299,988 (+12,692)
122,149 (-1,240)
2,691 (+11)
84,267 (+1,137)
2,652 (+11)
163,212 (+88,936)
99,513 (+42)
108,702 (+45)
141,224 (0)
2,381 (-34)
2,448 (+55)
420 (+55)
25,830 (+44)
349 (-88)
49,472 (+22)
15,978 (+33)
24,891 (+22)
24,847 (0)
17,167 (+47)
8,620 (-67)
+0.37%
-76.39%
+3.37%
+0.16%
+4.42%
-1.00%
+0.41%
+1.37%
+0.42%
+119.74%
+0.04%
+0.04%
0.00%
-1.41%
+2.30%
+15.07%
+0.17%
-20.14%
+0.04%
+0.21%
+0.09%
0.00%
+0.27%
-0.77%
7 (0)
7 (-7)
4 (0)
5 (0)
13 (-1)
13 (-1)
1,136 (-28)
9 (+1)
94 (0)
3 (0)
22 (0)
2 (0)
89 (-2)
7 (0)
7 (-19)
7 (0)
2 (0)
3 (0)
177 (-4)
2 (0)
90 (-2)
90 (-2)
5 (0)
1 (0)
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,301 (+4,715)
35,418 (-22)
30,650 (+73)
3,262 (+784)
50,020 (+15)
80,895 (-130)
21,730 (+6)
+17.09%
-0.06%
+0.24%
+31.64%
+0.03%
-0.16%
+0.03%
33,006 (+3,635)
29,576 (-22)
27,469 (+74)
3,262 (+784)
50,326 (+22)
82,384 (-14)
20,628 (0)
+12.38%
-0.07%
+0.27%
+31.64%
+0.04%
-0.02%
0.00%
71,494 (+18,476)
47,234 (-22)
45,242 (+74)
3,262 (+784)
50,326 (+22)
85,012 (-14)
33,597 (+25)
+34.85%
-0.05%
+0.16%
+31.64%
+0.04%
-0.02%
+0.07%
23 (+1)
14 (0)
9 (0)
1 (-1)
89 (-2)
202 (-2)
5 (0)
STMDeploymentTracker 0 (0) registerSTMAssetOnL1 54,730 (-22,029) -28.70% 54,730 (-22,029) -28.70% 54,730 (-22,029) -28.70% 54,730 (-22,029) -28.70% 7 (0)
Bridgehub 3,337,352 (+41,163) acceptAdmin
acceptOwnership
addStateTransitionManager
addToken
baseToken
bridgeBurn
bridgeMint
createNewChain
forwardTransactionOnGateway
getHyperchain
initialize
l2TransactionBaseCost
owner
pendingOwner
proveL1ToL2TransactionStatus
proveL2LogInclusion
registerSettlementLayer
removeStateTransitionManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setAssetHandlerAddressInitial
setPendingAdmin
sharedBridge
stateTransitionManager
stateTransitionManagerIsRegistered
stmAssetId
stmAssetIdToAddress
tokenIsRegistered
transferOwnership
46,892 (-22)
12,115 (-22)
23,874 (+864)
24,024 (+992)
2,542 (-22)
154,386 (-44)
3,683,281 (-44)
3,758,749 (-2,985)
80,397 (-22)
1,856 (+22)
24,232 (0)
2,303 (-22)
442 (-22)
485 (+22)
0 (0)
0 (0)
24,844 (+22)
23,895 (0)
242,956 (+1,495)
383,927 (+1,451)
67,221 (+89)
25,096 (-22)
26,052 (+110)
404 (-22)
608 (-22)
589 (-22)
736 (-22)
520 (-22)
677 (+109)
22,417 (0)
-0.05%
-0.18%
+3.75%
+4.31%
-0.86%
-0.03%
-0.00%
-0.08%
-0.03%
+1.20%
0.00%
-0.95%
-4.74%
+4.75%
+∞%
+∞%
+0.09%
0.00%
+0.62%
+0.38%
+0.13%
-0.09%
+0.42%
-5.16%
-3.49%
-3.60%
-2.90%
-4.06%
+19.19%
0.00%
46,892 (-22)
21,295 (+182)
41,102 (+801)
36,333 (-989)
2,542 (-22)
154,386 (-44)
3,683,281 (-44)
3,820,585 (-9,932)
80,397 (-22)
2,087 (+22)
31,982 (-369)
2,648 (-22)
2,292 (-29)
485 (+22)
1,922 (-18)
2,090 (+12)
24,844 (+22)
25,548 (+285)
242,956 (+1,495)
552,408 (+9,942)
67,221 (+89)
25,096 (-22)
37,994 (+112)
1,404 (-22)
983 (-22)
1,254 (-22)
736 (-22)
520 (-22)
1,507 (+245)
39,757 (+386)
-0.05%
+0.86%
+1.99%
-2.65%
-0.86%
-0.03%
-0.00%
-0.26%
-0.03%
+1.07%
-1.14%
-0.82%
-1.25%
+4.75%
-0.93%
+0.58%
+0.09%
+1.13%
+0.62%
+1.83%
+0.13%
-0.09%
+0.30%
-1.54%
-2.19%
-1.72%
-2.90%
-4.06%
+19.41%
+0.98%
46,892 (-22)
25,579 (-22)
47,565 (+1,123)
26,242 (-20,006)
2,542 (-22)
154,386 (-44)
3,683,281 (-44)
3,849,578 (-13,985)
80,397 (-22)
1,856 (+22)
24,232 (0)
2,303 (-22)
2,442 (-22)
485 (+22)
1,539 (-11)
1,676 (0)
24,844 (+22)
25,905 (+572)
242,956 (+1,495)
636,649 (+14,187)
67,221 (+89)
25,096 (-22)
37,962 (+110)
1,404 (-22)
608 (-22)
589 (-22)
736 (-22)
520 (-22)
677 (+109)
47,849 (0)
-0.05%
-0.09%
+2.42%
-43.26%
-0.86%
-0.03%
-0.00%
-0.36%
-0.03%
+1.20%
0.00%
-0.95%
-0.89%
+4.75%
-0.71%
0.00%
+0.09%
+2.26%
+0.62%
+2.28%
+0.13%
-0.09%
+0.29%
-1.54%
-3.49%
-3.60%
-2.90%
-4.06%
+19.19%
0.00%
46,892 (-22)
25,579 (-22)
47,565 (+1,123)
47,499 (+1,035)
2,542 (-22)
154,386 (-44)
3,683,281 (-44)
3,863,735 (-13,985)
80,397 (-22)
15,487 (+22)
48,591 (0)
32,138 (-22)
2,442 (-22)
485 (+22)
4,748 (-22)
5,026 (0)
24,844 (+22)
26,362 (0)
242,956 (+1,495)
636,649 (+14,187)
67,221 (+89)
25,096 (-22)
49,872 (+110)
2,404 (-22)
2,608 (-22)
2,589 (-22)
736 (-22)
520 (-22)
2,677 (+109)
47,849 (0)
-0.05%
-0.09%
+2.42%
+2.23%
-0.86%
-0.03%
-0.00%
-0.36%
-0.03%
+0.14%
0.00%
-0.07%
-0.89%
+4.75%
-0.46%
0.00%
+0.09%
0.00%
+0.62%
+2.28%
+0.13%
-0.09%
+0.22%
-0.91%
-0.84%
-0.84%
-2.90%
-4.06%
+4.24%
0.00%
256 (0)
22 (+1)
3,591 (0)
1,557 (-256)
2 (0)
2 (0)
3 (0)
19 (0)
1 (0)
287 (0)
22 (+1)
259 (0)
576 (+2)
7 (0)
512 (0)
512 (0)
3 (0)
2,048 (0)
1 (0)
3 (0)
7 (0)
7 (0)
512 (0)
6 (0)
4,096 (0)
3,079 (0)
7 (0)
7 (0)
1,313 (-256)
22 (+1)
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)
22,359 (-22)
559 (-22)
425 (+66)
328 (-22)
+0.14%
+0.16%
-0.08%
-0.07%
-0.10%
-3.79%
+18.38%
-6.29%
38,734 (+75)
63,490 (+3,691)
72,795 (-30)
36,833 (-25)
22,517 (-22)
1,130 (-22)
925 (+66)
828 (-22)
+0.19%
+6.17%
-0.04%
-0.07%
-0.10%
-1.91%
+7.68%
-2.59%
41,519 (+49)
77,866 (+4,993)
78,499 (-11)
37,597 (-11)
22,359 (-22)
559 (-22)
425 (+66)
328 (-22)
+0.12%
+6.85%
-0.01%
-0.03%
-0.10%
-3.79%
+18.38%
-6.29%
42,558 (+49)
94,818 (+366)
94,622 (-44)
40,290 (-22)
23,625 (-22)
2,559 (-22)
2,425 (+66)
2,328 (-22)
+0.12%
+0.39%
-0.05%
-0.05%
-0.09%
-0.85%
+2.80%
-0.94%
6 (0)
12 (0)
6 (0)
6 (0)
8 (0)
7 (0)
4 (0)
4 (0)
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,955 (-6)
1,396 (+14)
52,557 (+31)
-4.29%
-0.01%
+1.01%
+0.06%
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)
174 (-4)
52 (+4)
359 (-8)
GatewayScript 1,865,564 (0) moveChainToGateway
registerGateway
registerL2Contracts
1,079,905 (+14,187)
82,934 (+22)
473,645 (+1,429)
+1.33%
+0.03%
+0.30%
1,079,905 (+14,187)
82,934 (+22)
473,645 (+1,429)
+1.33%
+0.03%
+0.30%
1,079,905 (+14,187)
82,934 (+22)
473,645 (+1,429)
+1.33%
+0.03%
+0.30%
1,079,905 (+14,187)
82,934 (+22)
473,645 (+1,429)
+1.33%
+0.03%
+0.30%
2 (0)
3 (0)
1 (0)
DeployL1Script 47,871,133 (+239,732) run 48,432,724 (+210,342) +0.44% 48,432,724 (+210,342) +0.44% 48,432,724 (+210,342) +0.44% 48,432,724 (+210,342) +0.44% 7 (0)
RegisterHyperchainScript 4,282,865 (-8,851) run 6,461,461 (-15,221) -0.24% 7,417,145 (-11,174) -0.15% 6,475,618 (-15,221) -0.23% 9,043,327 (-4,236) -0.05% 19 (0)
StateTransitionManager 4,154,252 (0) forwardedBridgeBurn
forwardedBridgeMint
registerSettlementLayer
26,951 (-22)
3,290,512 (-22)
37,861 (+22)
-0.08%
-0.00%
+0.06%
26,951 (-22)
3,290,512 (-22)
37,861 (+22)
-0.08%
-0.00%
+0.06%
26,951 (-22)
3,290,512 (-22)
37,861 (+22)
-0.08%
-0.00%
+0.06%
26,951 (-22)
3,290,512 (-22)
37,861 (+22)
-0.08%
-0.00%
+0.06%
2 (0)
3 (0)
3 (0)
DummySharedBridge 870,082 (+46,679) setDataToBeReturnedInFinalizeWithdrawal 88,830 (-22) -0.02% 88,830 (-22) -0.02% 88,830 (-22) -0.02% 88,830 (-22) -0.02% 1 (0)
MerkleTreeNoSort 534,636 (0) getProof 32,953 (0) 0.00% 33,179 (-2) -0.01% 33,193 (0) 0.00% 33,215 (0) 0.00% 273 (0)
DummyStateTransitionManagerWBH 4,165,232 (0) setHyperchain 111,114 (0) 0.00% 111,151 (+1) +0.00% 111,162 (+12) +0.01% 111,174 (0) 0.00% 768 (0)
MerkleTest 468,218 (0) calculateRoot(bytes32[],uint256,bytes32) 606 (0) 0.00% 2,921 (0) 0.00% 2,943 (0) 0.00% 2,987 (-11) -0.37% 261 (0)
DummyBridgehub 134,395 (+12)
DummyHyperchain 3,150,276 (+12)
AdminFacet 3,231,488 (-12)
MailboxFacet 2,954,429 (+12)
DefaultUpgrade 1,587,019 (-12)
DeployErc20Script 2,157,137 (-12)
TestFacet 78,531 (+12)
TestBaseFacet 242,752 (+24)
GettersFacetWrapper 1,710,995 (+12)

Copy link

github-actions bot commented Aug 9, 2024

Coverage after merging kl/custom-asset-bridging into kl/sync-layer-reorg will be

89.17%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../da-contracts/contracts
   RollupL1DAValidator.sol67.11%50%83.33%73.91%133, 136, 136, 136, 138, 169, 171, 25, 25, 25–26, 26, 26, 28, 30–31, 35–36, 58, 60, 60, 60–61, 63
contracts/bridge
   BridgeHelper.sol100%100%100%100%
   L1AssetRouter.sol95.78%89.29%97.37%98.39%118, 133, 190, 247, 308, 352, 488, 505, 526, 707–708, 843
   L1ERC20Bridge.sol100%100%100%100%
   L1NativeTokenVault.sol96.12%97.62%84.62%97.30%252, 257, 45
contracts/bridgehub
   Bridgehub.sol80.50%50.88%87.10%93.75%106, 111, 111, 131, 242–243, 245–247, 249, 305–306, 308, 308, 308, 351, 359–360, 363, 363, 363–364, 386, 424, 448–449, 528, 531–532, 561–562, 593, 598, 80, 85
   MessageRoot.sol91.38%61.54%100%100%156, 162, 69, 76, 94
   STMDeploymentTracker.sol71.43%50%77.78%77.78%106, 108, 111, 123, 31, 54, 81, 84
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.sol73.86%51.43%62.16%85.58%145–147, 151, 204, 247, 254, 272, 278, 285, 297, 304, 311, 319, 326, 334, 341, 350, 350, 350, 352, 363, 365, 432, 446, 452, 467, 483, 512, 83, 89, 89
   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.07%56.82%80.95%91.35%103, 103, 103–105, 131, 131, 131–132, 132, 132, 134, 155, 201–202, 204, 218–219, 226, 245–246, 251, 283, 293, 297, 317, 82, 91
   Executor.sol78.48%73.21%80.65%81.50%100, 160, 164–165, 165, 165–166, 166, 166, 177, 177, 181, 181, 181, 199, 213, 224, 227, 272, 272, 272, 275, 278, 280–281, 287–288, 307–310, 312, 361, 361, 361–364, 366, 369, 372–373, 382, 398, 401–402, 404–406, 417–419, 439, 480, 487, 506, 511, 520–521, 572, 597–598
   Getters.sol83.19%66.67%84.09%84.85%104, 107, 113, 116, 127, 130, 172, 223, 229, 233, 64, 79, 84
   Mailbox.sol58.38%47.06%59.26%61.61%105, 121–122, 122, 122, 124–125, 133–135, 146, 157–158, 160–161, 163, 168, 172, 172–174, 174, 174–175, 178, 178, 178, 181, 183–184, 186, 191, 193, 196–197, 202–205, 208–209, 226, 232, 232, 232, 240, 245, 272, 301–302, 379, 390, 396, 535, 535, 535–536, 556, 65, 75, 97
   ZkSyncHyperchainBase.sol82.14%78.57%85.71%85.71%48, 56, 56, 56
contracts/state-transition/data-availability
   CalldataDA.sol100%100%100%100%
   RelayedSLDAValidator.sol95.65%75%100%100%73
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.sol97.62%80%100%100%80
   TransactionValidator.sol97.18%94.12%100%100%54–55
contracts/upgrades
   BaseZkSyncUpgrade.sol69.42%48.65%100%75%102, 102, 102, 104, 107, 110–111, 122, 122, 122, 124, 127, 130–131, 145–147, 165–167, 206, 208,

@Raid5594 Raid5594 merged commit 19f08a4 into kl/sync-layer-reorg Aug 9, 2024
23 checks passed
@kelemeno kelemeno deleted the kl/custom-asset-bridging branch September 2, 2024 14:07
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.

1 participant