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

Merge sync-layer-stable into kl/sync-layer-reorg #719

Merged
merged 13 commits into from
Aug 20, 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

Changes to gas cost

Generated at commit: 0bbb4e054c2aec68d6e9746a1d21aca987b1c61d, compared to commit: 3de3430492c3129ebf193dc762b03fe9615b4e24

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter setHyperchain
setSTM
0 ➖
0 ➖
0.00%
0.00%
AdminFacet changeFeeParams
setDAValidatorPair
setPendingAdmin
setValidator
+22 ❌
+22 ❌
-88 ✅
+22 ❌
+0.24%
+0.04%
-0.61%
+0.17%
DiamondProxy changeFeeParams
setDAValidatorPair
setPendingAdmin
setValidator
+22 ❌
+22 ❌
-88 ✅
+22 ❌
+0.06%
+0.03%
-0.20%
+0.05%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) -1 ✅ -0.03%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 3,996,991 (+18,199) addStateTransitionManager
proveL1ToL2TransactionStatus
proveL2LogInclusion
removeStateTransitionManager
setHyperchain
setPendingAdmin
setSTM
23,853 (0)
0 (0)
0 (0)
23,851 (0)
111,384 (0)
25,965 (0)
44,187 (0)
0.00%
+∞%
+∞%
0.00%
0.00%
0.00%
0.00%
41,116 (+2)
1,379 (-6)
1,511 (-26)
25,514 (+14)
111,421 (0)
37,909 (+6)
44,224 (0)
+0.00%
-0.43%
-1.69%
+0.05%
0.00%
+0.02%
0.00%
47,544 (0)
985 (0)
1,136 (+3)
25,861 (0)
111,444 (+12)
37,875 (0)
44,247 (+12)
0.00%
0.00%
+0.26%
0.00%
+0.01%
0.00%
+0.03%
47,544 (0)
3,639 (0)
3,939 (+7)
26,318 (0)
111,444 (0)
49,785 (0)
44,247 (0)
0.00%
0.00%
+0.18%
0.00%
0.00%
0.00%
0.00%
3,584 (0)
512 (0)
512 (0)
2,048 (0)
768 (0)
512 (0)
768 (0)
AdminFacet 3,289,751 (+7,150) changeFeeParams
setDAValidatorPair
setPendingAdmin
setValidator
4,742 (+22)
50,114 (+22)
2,597 (-88)
2,793 (+22)
+0.47%
+0.04%
-3.28%
+0.79%
9,049 (+22)
50,114 (+22)
14,382 (-88)
12,771 (+22)
+0.24%
+0.04%
-0.61%
+0.17%
5,061 (+22)
50,114 (+22)
14,382 (-88)
9,211 (+22)
+0.44%
+0.04%
-0.61%
+0.24%
17,345 (+22)
50,114 (+22)
26,168 (-88)
26,311 (+22)
+0.13%
+0.04%
-0.34%
+0.08%
3 (0)
30 (0)
2 (0)
3 (0)
DiamondProxy 2,430,995 (+517,184) changeFeeParams
setDAValidatorPair
setPendingAdmin
setValidator
34,086 (+22)
79,194 (+22)
31,322 (-88)
31,667 (+22)
+0.06%
+0.03%
-0.28%
+0.07%
38,387 (+22)
79,194 (+22)
43,098 (-88)
40,027 (+22)
+0.06%
+0.03%
-0.20%
+0.05%
34,402 (+22)
79,194 (+22)
43,098 (-88)
33,251 (+22)
+0.06%
+0.03%
-0.20%
+0.07%
46,673 (+22)
79,194 (+22)
54,874 (-88)
55,163 (+22)
+0.05%
+0.03%
-0.16%
+0.04%
3 (0)
30 (0)
2 (0)
3 (0)
MerkleTest 468,218 (0) calculateRoot(bytes32[],uint256,bytes32) 606 (0) 0.00% 2,921 (-1) -0.03% 2,943 (0) 0.00% 2,987 (-11) -0.37% 261 (0)
MerkleTreeNoSort 534,636 (0) getProof 32,953 (0) 0.00% 33,181 (+2) +0.01% 33,193 (0) 0.00% 33,215 (0) 0.00% 273 (0)
DummyStateTransitionManager 3,985,855 (+33,322)
StateTransitionManager 3,965,720 (+33,442)
GenerateForceDeploymentsData 1,249,921 (+12)

Copy link

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

88.71%

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%251, 256, 44
contracts/bridgehub
   Bridgehub.sol71.43%44.30%78.95%84.51%104, 109, 115, 120, 120, 159, 187, 187–188, 190–191, 191, 191–192, 198–199, 199, 199–200, 200, 200, 202–203, 203, 203–204, 268, 298–300, 302–304, 306, 332, 341, 346–347, 397–398, 400, 400, 400, 443, 451–452, 455, 455, 455–456, 478, 516, 540–541, 620, 623–624, 628–629, 656–657, 662–663, 691, 696, 99
   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.84%51.52%58.82%85.26%103, 130–132, 136, 189, 232, 239, 257, 263, 270, 282, 289, 296, 304, 311, 319, 326, 339, 341, 407, 426, 429, 444, 449, 474, 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%70%100%100%32–36, 60
   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.sol81.82%66.67%82.22%83.58%110, 113, 119, 122, 133, 136, 178, 229, 235, 239, 65, 70, 85, 90
   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%

@StanislavBreadless StanislavBreadless merged commit 8f4aad4 into kl/sync-layer-reorg Aug 20, 2024
25 checks passed
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