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

Sync reorg with stable #779

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

StanislavBreadless
Copy link
Collaborator

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Copy link

github-actions bot commented Sep 6, 2024

Changes to gas cost

Generated at commit: 23d79c0a3e4afa38051439b4343117acfc7ae2a8, compared to commit: b6766b05db7745e2df2463fc6ce96fdc103b28ad

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter removeChainTypeManager
setAddresses
setCTM
setPendingAdmin
setZKChain
-29 ✅
-22 ✅
-2 ✅
-15 ✅
-2 ✅
-0.11%
-0.04%
-0.00%
-0.04%
-0.00%
GettersFacetWrapper getTotalPriorityTxs +34 ❌ +1.18%
MailboxFacet bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
-33 ✅
+130 ❌
-22 ✅
-4 ✅
-22 ✅
-29 ✅
-0.04%
+0.26%
-0.50%
-0.09%
-0.68%
-0.03%
ChainAdmin setUpgradeTimestamp +258 ❌ +0.57%
DiamondProxy bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
-33 ✅
+141 ❌
-22 ✅
-4 ✅
-22 ✅
-22 ✅
-0.03%
+0.18%
-0.23%
-0.05%
-0.35%
-0.02%
Bridgehub createNewChain
setAddresses
-51 ✅
+45 ❌
-0.00%
+0.06%
PermanentRestriction allowAdminImplementation
setAllowedData
-11 ✅
-29 ✅
-0.02%
-0.06%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 5,300,040 (-136,900) addChainTypeManager
admin
proveL1ToL2TransactionStatus
proveL2LogInclusion
removeChainTypeManager
setAddresses
setCTM
setPendingAdmin
setZKChain
23,865 (0)
411 (0)
0 (0)
0 (0)
23,802 (-22)
50,990 (-22)
44,148 (0)
25,880 (-22)
111,315 (0)
0.00%
0.00%
+∞%
+∞%
-0.09%
-0.04%
0.00%
-0.08%
0.00%
41,112 (-4)
1,412 (+1)
1,366 (-18)
1,475 (-4)
25,415 (-29)
50,990 (-22)
44,184 (-2)
41,566 (-15)
111,351 (-2)
-0.01%
+0.07%
-1.30%
-0.27%
-0.11%
-0.04%
-0.00%
-0.04%
-0.00%
47,558 (0)
2,411 (0)
969 (0)
1,060 (0)
25,774 (-22)
50,990 (-22)
44,184 (-24)
49,541 (-22)
111,351 (-24)
0.00%
0.00%
0.00%
0.00%
-0.09%
-0.04%
-0.05%
-0.04%
-0.02%
47,558 (0)
2,411 (0)
3,607 (0)
3,792 (+7)
26,190 (-22)
50,990 (-22)
44,208 (0)
49,757 (-22)
111,375 (0)
0.00%
0.00%
0.00%
+0.18%
-0.08%
-0.04%
0.00%
-0.04%
0.00%
3,584 (0)
2,045 (-1)
512 (0)
512 (0)
2,048 (0)
512 (0)
768 (0)
1,277 (-1)
768 (0)
GettersFacetWrapper 2,180,641 (+1,836) getTotalPriorityTxs 2,907 (+34) +1.18% 2,907 (+34) +1.18% 2,907 (+34) +1.18% 2,907 (+34) +1.18% 1 (0)
MailboxFacet 3,258,553 (-348,509) bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
2,520 (0)
8,079 (-22)
2,987 (-22)
3,372 (-4)
1,574 (-22)
3,139 (0)
0.00%
-0.27%
-0.73%
-0.12%
-1.38%
0.00%
75,948 (-33)
49,196 (+130)
4,346 (-22)
4,340 (-4)
3,236 (-22)
99,833 (-29)
-0.04%
+0.26%
-0.50%
-0.09%
-0.68%
-0.03%
118,989 (-44)
49,357 (-117)
4,349 (-22)
4,340 (-4)
3,561 (-22)
135,326 (-44)
-0.04%
-0.24%
-0.50%
-0.09%
-0.61%
-0.03%
123,303 (-44)
49,357 (-117)
4,349 (-22)
5,309 (-4)
5,541 (-22)
161,963 (-44)
-0.04%
-0.24%
-0.50%
-0.08%
-0.40%
-0.03%
5 (0)
257 (0)
516 (0)
2 (0)
6 (0)
771 (0)
ChainAdmin 909,847 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,256 (+258) +0.57% 45,381 (+60) +0.13% 45,645 (0) 0.00% 256 (0)
DiamondProxy 2,475,585 (0) bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
util_setChainId
34,187 (0)
37,568 (-22)
8,238 (-22)
4,158 (-4)
4,328 (-22)
33,146 (0)
28,906 (0)
0.00%
-0.06%
-0.27%
-0.10%
-0.51%
0.00%
0.00%
105,932 (-33)
76,479 (+141)
9,596 (-22)
7,373 (-4)
6,287 (-22)
129,617 (-22)
33,734 (-22)
-0.03%
+0.18%
-0.23%
-0.05%
-0.35%
-0.02%
-0.07%
147,852 (-44)
76,574 (-93)
9,599 (-22)
7,373 (-4)
5,640 (-22)
166,368 (-8)
33,718 (0)
-0.03%
-0.12%
-0.23%
-0.05%
-0.39%
-0.00%
0.00%
152,166 (-44)
76,874 (-117)
9,599 (-22)
10,589 (-4)
10,839 (-22)
190,435 (-44)
34,090 (0)
-0.03%
-0.15%
-0.23%
-0.04%
-0.20%
-0.02%
0.00%
5 (0)
257 (0)
516 (0)
2 (0)
6 (0)
771 (0)
519 (0)
Bridgehub 5,262,920 (-136,885) createNewChain
setAddresses
4,072,605 (-51)
70,960 (+45)
-0.00%
+0.06%
4,072,605 (-51)
70,960 (+45)
-0.00%
+0.06%
4,072,605 (-51)
70,960 (+45)
-0.00%
+0.06%
4,072,605 (-51)
70,960 (+45)
-0.00%
+0.06%
15 (0)
15 (0)
PermanentRestriction 1,147,705 (0) allowAdminImplementation
setAllowedData
47,494 (-12)
48,233 (0)
-0.03%
0.00%
47,730 (-11)
49,274 (-29)
-0.02%
-0.06%
47,866 (0)
48,944 (+48)
0.00%
+0.10%
47,866 (0)
51,005 (-24)
0.00%
-0.05%
258 (0)
257 (0)
AccessControlRestriction 1,759,703 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,036 (0)
48,605 (0)
47,940 (0)
0.00%
0.00%
0.00%
51,279 (-4)
49,426 (-8)
48,850 (+4)
-0.01%
-0.02%
+0.01%
51,408 (0)
48,977 (0)
48,312 (0)
0.00%
0.00%
0.00%
51,408 (0)
51,877 (0)
51,658 (0)
0.00%
0.00%
0.00%
1,024 (0)
1,280 (0)
1,280 (0)
MerkleTreeNoSort 583,114 (0) getProof 2,608 (0) 0.00% 32,751 (-1) -0.00% 33,207 (0) 0.00% 33,229 (0) 0.00% 277 (0)
DiamondCutTestContract 2,420,735 (+1,932)
DummyBridgehub 202,491 (+12)
DummyZKChain 3,524,992 (-350,409)
TestExecutor 3,092,720 (+12)
DiamondInit 625,076 (+24)
AdminFacet 4,598,131 (-12)
GettersFacet 1,143,620 (+1,944)
DefaultUpgrade 1,671,224 (-12)

Copy link

github-actions bot commented Sep 6, 2024

Coverage after merging sb-sync-reorg-with-stable into kl/sync-layer-reorg will be

87.57%

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.95%85.07%94.87%96.63%139–140, 155–156, 216, 236, 285, 338, 390, 550, 571, 613, 732–733, 754–755, 896
   L1ERC20Bridge.sol97.50%100%100%96.55%116
   L1NativeTokenVault.sol92.31%93.33%78.57%94.19%175–176, 256, 284, 289, 46–47
contracts/bridgehub
   Bridgehub.sol66.23%35.90%75.61%76.72%110, 110, 110, 115, 121, 126, 131, 163–164, 207, 207–208, 210–211, 211, 211–212, 218–219, 219, 219–220, 220, 220, 222–223, 223, 223–224, 232–233, 247–248, 295–296, 326–327, 329–330, 332–334, 336–337, 340–341, 344, 346–347, 349–350, 377–378, 388–389, 393, 393–394, 396, 424, 448–450, 453, 453–454, 498, 506–508, 512, 512–513, 515, 529–530, 542–543, 578, 597–598, 677, 680–681, 685–686, 716–717, 730, 775, 780, 785, 790, 799
   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.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
   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, 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.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.sol75.64%55.84%92.86%80.68%119–120, 172, 177, 182, 187, 192, 197, 201–202, 207, 207–208, 208–209, 211, 211–212, 222–224, 226, 226–227, 251–252, 269, 272, 318, 318–319, 323, 327, 329–330, 336–337, 356–359, 361, 37, 417, 417, 417–420, 422, 425, 428–429, 446, 449–450, 452–454, 467–469, 530–531, 539–540, 562–563, 573–574, 625–626, 652–653
   Getters.sol86.32%66.67%86.67%87.88%115, 118, 129, 132, 227, 232, 236, 70, 85, 90
   Mailbox.sol82.52%70.59%90%83.80%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, 372–373, 54
   ZKChainBase.sol70.59%66.67%75%70.59%59, 59–60, 66, 66–67, 73, 76
contracts/state-transition/data-availability
   CalldataDA.sol100%100%100%100%
   

@StanislavBreadless StanislavBreadless merged commit cb42ae4 into kl/sync-layer-reorg Sep 6, 2024
25 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-sync-reorg-with-stable branch September 6, 2024 13:57
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