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

Remove most info from relayed L1->GW priority ops #775

Merged

Conversation

StanislavBreadless
Copy link
Collaborator

What ❔

Since the server now supports it, it makes sense to remove one of the riskiest parts of the free L1->GW transactions: their side and impact on the operator

Server PR: matter-labs/zksync-era#2813

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: 5c0f7bda4e8fc26b233c79c873864d4d620b25a8, compared to commit: 73ddd6d8da49fef0c8adddddea7b5ce287b1cbbe

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter setAddresses
setPendingAdmin
stateTransitionManager
-22 ✅
-14 ✅
-22 ✅
-0.04%
-0.03%
-1.05%
GettersFacetWrapper getTotalPriorityTxs +34 ❌ +1.17%
MailboxFacet bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
-43 ✅
+12 ❌
-22 ✅
-4 ✅
-22 ✅
-38 ✅
-0.06%
+0.02%
-0.50%
-0.09%
-0.65%
-0.04%
DiamondProxy bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
-43 ✅
+22 ❌
-22 ✅
-4 ✅
-22 ✅
-44 ✅
-0.04%
+0.03%
-0.23%
-0.05%
-0.34%
-0.03%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,060,216 (-123,712) proveL1ToL2TransactionStatus
proveL2LogInclusion
removeStateTransitionManager
setAddresses
setPendingAdmin
stateTransitionManager
0 (0)
0 (0)
23,833 (0)
51,087 (-22)
25,981 (-22)
564 (-22)
+∞%
+∞%
0.00%
-0.04%
-0.08%
-3.75%
1,392 (-5)
1,563 (+35)
25,466 (-3)
51,087 (-22)
41,649 (-14)
2,064 (-22)
-0.36%
+2.29%
-0.01%
-0.04%
-0.03%
-1.05%
1,002 (-3)
1,128 (0)
25,833 (0)
51,087 (-22)
49,663 (-22)
2,564 (-22)
-0.30%
0.00%
0.00%
-0.04%
-0.04%
-0.85%
3,674 (0)
3,922 (-7)
26,245 (0)
51,087 (-22)
49,879 (-22)
2,564 (-22)
0.00%
-0.18%
0.00%
-0.04%
-0.04%
-0.85%
512 (0)
512 (0)
2,048 (0)
512 (0)
1,280 (0)
1,024 (0)
GettersFacetWrapper 1,742,142 (+1,951) getTotalPriorityTxs 2,929 (+34) +1.17% 2,929 (+34) +1.17% 2,929 (+34) +1.17% 2,929 (+34) +1.17% 1 (0)
MailboxFacet 2,688,455 (-316,353) bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
2,527 (0)
8,229 (-22)
3,012 (-22)
3,430 (-4)
1,708 (-22)
3,249 (0)
0.00%
-0.27%
-0.73%
-0.12%
-1.27%
0.00%
76,386 (-43)
49,104 (+12)
4,395 (-22)
4,398 (-4)
3,374 (-22)
100,348 (-38)
-0.06%
+0.02%
-0.50%
-0.09%
-0.65%
-0.04%
119,593 (-56)
49,636 (-111)
4,398 (-22)
4,398 (-4)
3,701 (-22)
136,043 (-56)
-0.05%
-0.22%
-0.50%
-0.09%
-0.59%
-0.04%
123,979 (-56)
49,636 (-111)
4,398 (-22)
5,367 (-4)
5,681 (-22)
162,680 (-56)
-0.05%
-0.22%
-0.50%
-0.07%
-0.39%
-0.03%
5 (0)
257 (0)
516 (0)
2 (0)
6 (0)
771 (0)
DiamondProxy 1,888,784 (-539,861) bridgehubRequestL2Transaction
finalizeEthWithdrawal
l2TransactionBaseCost
proveL1ToL2TransactionStatus
proveL2LogInclusion
requestL2Transaction
util_setChainId
34,233 (0)
37,757 (-22)
8,302 (-22)
4,255 (-4)
4,507 (-22)
33,295 (0)
29,011 (0)
0.00%
-0.06%
-0.26%
-0.09%
-0.49%
0.00%
0.00%
106,409 (-43)
76,416 (+22)
9,684 (-22)
7,470 (-4)
6,464 (-22)
130,156 (-44)
33,873 (+24)
-0.04%
+0.03%
-0.23%
-0.05%
-0.34%
-0.03%
+0.07%
148,495 (-56)
76,904 (-63)
9,687 (-22)
7,470 (-4)
5,816 (-22)
167,052 (-104)
33,823 (0)
-0.04%
-0.08%
-0.23%
-0.05%
-0.38%
-0.06%
0.00%
152,881 (-56)
77,192 (-111)
9,687 (-22)
10,686 (-4)
11,018 (-22)
191,191 (-56)
34,195 (0)
-0.04%
-0.14%
-0.23%
-0.04%
-0.20%
-0.03%
0.00%
5 (0)
257 (0)
516 (0)
2 (0)
6 (0)
771 (0)
519 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,741 (-1) -0.00% 33,193 (0) 0.00% 33,215 (0) 0.00% 277 (0)
DiamondCutTestContract 1,826,396 (+1,881)
DummyHyperchain 2,895,189 (-318,385)
DummySharedBridge 1,310,803 (-12)
GettersFacet 922,106 (+1,944)
RelayedSLDAValidator 631,076 (-12)
DefaultUpgrade 1,332,833 (-12)

Copy link

github-actions bot commented Sep 6, 2024

Coverage after merging sb-remove-most-info-from-priority-ops into sync-layer-stable will be

87.09%

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.sol67.11%36.36%77.50%77.72%109, 109, 109, 114, 120, 125, 130, 162–163, 206, 206–207, 209–210, 210, 210–211, 217–218, 218, 218–219, 219, 219, 221–222, 222, 222–223, 231–232, 246–247, 294–295, 325–326, 328–329, 331–333, 335–336, 339–340, 346, 348–349, 351–352, 379–380, 390–391, 394, 422, 446–448, 451, 451–452, 496, 504–506, 510, 510–511, 513, 527–528, 540–541, 576, 595–596, 675, 678–679, 683–684, 711–712, 721, 766, 771, 776, 781
   MessageRoot.sol91.07%63.64%100%96.97%116–117, 148, 69, 87
   STMDeploymentTracker.sol79.07%50%90%94.74%115, 119, 34, 41, 64, 91, 94, 96
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.sol73.93%38.18%90.91%85.82%104–105, 115–116, 130, 130–131, 133–134, 157, 157, 157–158, 158, 158, 160, 239, 241, 254–255, 261, 278, 289–290, 295, 307, 307, 309, 309, 309, 315, 315, 315–316, 316, 316–318, 318, 318–319, 319, 319–321, 348, 350, 354, 363, 373, 377, 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.sol82.91%66.67%82.22%84.85%115, 118, 129, 132, 174, 227, 233, 237, 65, 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
   ZkSyncHyperchainBase.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%
   CalldataDAGateway.sol85.71%66.67%100%100%27–28
   RelayedSLDAValidator.sol96.67%83.33%100%100%94
contracts/state-transition/libraries
   

@StanislavBreadless StanislavBreadless merged commit dccc114 into sync-layer-stable Sep 6, 2024
24 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-remove-most-info-from-priority-ops branch September 6, 2024 11:48
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