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-layer-stable with main #817

Merged
merged 9 commits into from
Sep 22, 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.

@StanislavBreadless StanislavBreadless changed the title Sb sync stable with main 2 Sync-layer-stable with main Sep 21, 2024
Copy link

Changes to gas cost

Generated at commit: 2685a76c03c670df78329a3df6c6fd883c30b39a, compared to commit: b3c30aece4d09c88f5c9434fafb2c621d77f846b

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter createNewChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
setCTM
setZKChain
-1,442 ✅
-184 ✅
+58 ❌
-1 ✅
-1 ✅
-1.34%
-0.19%
+0.04%
-0.00%
-0.00%
DiamondProxy requestL2Transaction +4 ❌ +0.00%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) -2 ✅ -0.07%
TestnetERC20Token transfer +16 ❌ +0.03%
PermanentRestriction setAllowedData -11 ✅ -0.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 5,364,520 (0) addChainTypeManager
admin
createNewChain
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setCTM
setPendingAdmin
setZKChain
23,865 (0)
411 (0)
28,559 (-792)
0 (0)
0 (0)
0 (0)
23,802 (0)
32,938 (-24)
30,887 (+12)
24,282 (0)
44,193 (0)
25,880 (0)
111,315 (0)
0.00%
0.00%
-2.70%
+∞%
+∞%
+∞%
0.00%
-0.07%
+0.04%
0.00%
0.00%
0.00%
0.00%
44,089 (-1)
1,523 (+1)
106,087 (-1,442)
1,367 (-4)
1,462 (-7)
1,537 (-2)
25,420 (+3)
95,647 (-184)
144,108 (+58)
65,955 (+10)
44,230 (-1)
47,592 (+5)
111,352 (-1)
-0.00%
+0.07%
-1.34%
-0.29%
-0.48%
-0.13%
+0.01%
-0.19%
+0.04%
+0.02%
-0.00%
+0.01%
-0.00%
47,558 (0)
2,411 (0)
36,343 (0)
961 (-6)
1,063 (+3)
1,150 (+9)
25,774 (0)
76,388 (+3,433)
58,070 (+11,138)
71,130 (0)
44,241 (-12)
49,745 (0)
111,363 (-12)
0.00%
0.00%
0.00%
-0.62%
+0.28%
+0.79%
0.00%
+4.71%
+23.73%
0.00%
-0.03%
0.00%
-0.01%
47,558 (0)
2,411 (0)
857,173 (-6,924)
3,585 (0)
3,792 (+7)
3,941 (-14)
26,190 (0)
225,648 (+4,530)
399,417 (-84)
91,270 (0)
44,253 (0)
49,757 (0)
111,375 (0)
0.00%
0.00%
-0.80%
0.00%
+0.18%
-0.35%
0.00%
+2.05%
-0.02%
0.00%
0.00%
0.00%
0.00%
6,656 (0)
2,302 (-1)
2,560 (0)
512 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,535 (-1)
3,328 (0)
2,816 (0)
4,862 (-1)
2,816 (0)
ChainAdmin 909,847 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,236 (+146) +0.32% 45,333 (0) 0.00% 45,645 (0) 0.00% 256 (0)
MailboxFacet 3,287,412 (0) finalizeEthWithdrawal 8,101 (0) 0.00% 49,205 (+123) +0.25% 49,490 (0) 0.00% 49,490 (0) 0.00% 257 (0)
DiamondProxy 2,475,597 (0) finalizeEthWithdrawal
requestL2Transaction
util_setChainId
37,590 (0)
33,146 (0)
28,906 (0)
0.00%
0.00%
0.00%
76,485 (+124)
128,884 (+4)
33,719 (-5)
+0.16%
+0.00%
-0.01%
76,707 (0)
166,344 (+48)
33,718 (0)
0.00%
+0.03%
0.00%
77,007 (0)
188,247 (0)
34,090 (0)
0.00%
0.00%
0.00%
257 (0)
771 (0)
519 (0)
MerkleTest 520,004 (0) calculateRoot(bytes32[],uint256,bytes32) 565 (0) 0.00% 2,929 (-2) -0.07% 2,982 (0) 0.00% 3,026 (-11) -0.36% 265 (0)
TestnetERC20Token 800,383 (0) approve
mint
transfer
24,247 (0)
34,018 (0)
46,273 (0)
0.00%
0.00%
0.00%
46,237 (-3)
61,947 (-2)
46,641 (+16)
-0.01%
-0.00%
+0.03%
46,207 (0)
68,242 (0)
46,609 (+24)
0.00%
0.00%
+0.05%
46,543 (0)
68,602 (0)
46,873 (0)
0.00%
0.00%
0.00%
1,512 (0)
1,679 (0)
257 (0)
PermanentRestriction 1,147,693 (0) allowAdminImplementation
setAllowedData
setSelectorIsValidated
47,494 (0)
48,233 (0)
47,583 (0)
0.00%
0.00%
0.00%
47,720 (-15)
49,224 (-11)
47,614 (-1)
-0.03%
-0.02%
-0.00%
47,866 (0)
48,920 (+36)
47,631 (0)
0.00%
+0.07%
0.00%
47,866 (0)
50,993 (-36)
47,631 (0)
0.00%
-0.07%
0.00%
258 (0)
257 (0)
258 (0)
AccessControlRestriction 1,759,703 (0) setRequiredRoleForCall
setRequiredRoleForFallback
48,605 (0)
47,940 (0)
0.00%
0.00%
49,426 (-6)
48,845 (-5)
-0.01%
-0.01%
48,977 (0)
48,312 (0)
0.00%
0.00%
51,877 (0)
51,658 (0)
0.00%
0.00%
1,280 (0)
1,280 (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)
L1NativeTokenVault 3,828,533 (0) bridgeBurn 12,557 (0) 0.00% 84,718 (-4) -0.00% 99,656 (0) 0.00% 99,656 (0) 0.00% 1,297 (0)
TransparentUpgradeableProxy 987,816 (+199,948)

Copy link

Coverage after merging sb-sync-stable-with-main-2 into sync-layer-stable will be

85.15%

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.sol76.36%56%80%82.86%111–112, 127, 127–128, 135, 135–136, 143, 143–144, 173–174, 197, 233–234, 236–237, 246–247, 255–256, 258, 424, 426–427, 427, 427, 429–430, 430, 430, 441–442, 455–456, 477–478, 517, 611, 697, 699, 701, 714, 728, 733
contracts/bridge/asset-router
   AssetRouterBase.sol83.78%40%100%88%138–139, 57–58, 85–86
   L1AssetRouter.sol90.20%72%92%94.17%204–205, 241, 250, 252, 255, 57, 576, 58, 73–74, 81–82
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.sol80%48.48%93.33%86.61%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
   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, 119, 129, 129–131, 134, 75, 83
   DynamicIncrementalMerkle.sol74.42%100%80%72.22%67–70, 72–74, 76–78
   FullMerkle.sol100%100%100%100%
   L2ContractHelper.sol50%0%50%60%100, 100–101, 109, 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.sol66.67%33.33%57.14%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,

@StanislavBreadless StanislavBreadless merged commit de3f407 into sync-layer-stable Sep 22, 2024
26 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-sync-stable-with-main-2 branch September 22, 2024 13:55
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