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

L2 verifier support #756

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.

Base automatically changed from kl/sync-layer-reorg-foundry to kl/sync-layer-reorg August 29, 2024 10:46
Copy link

github-actions bot commented Aug 29, 2024

Changes to gas cost

Generated at commit: 27170b3c9eccbf3e75e97f2f941870e6b5d50abc, compared to commit: adc2e764b07e261df63f788145fa91a2cf4f0b9c

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter setHyperchain
setSTM
+1 ❌
+1 ❌
+0.00%
+0.00%
DiamondProxy requestL2Transaction +1 ❌ +0.00%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) +1 ❌ +0.03%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,074,017 (0) addStateTransitionManager
proveL1ToL2TransactionStatus
proveL2LogInclusion
setHyperchain
setSTM
23,857 (0)
0 (0)
0 (0)
111,344 (0)
44,253 (0)
0.00%
+∞%
+∞%
0.00%
0.00%
41,136 (+1)
1,376 (-52)
1,577 (+47)
111,381 (+1)
44,290 (+1)
+0.00%
-3.64%
+3.07%
+0.00%
+0.00%
47,583 (0)
1,002 (0)
1,128 (0)
111,392 (+12)
44,301 (+12)
0.00%
0.00%
0.00%
+0.01%
+0.03%
47,583 (0)
3,674 (0)
3,922 (-7)
111,404 (0)
44,313 (0)
0.00%
0.00%
-0.18%
0.00%
0.00%
3,584 (0)
512 (0)
512 (0)
768 (0)
768 (0)
MailboxFacet 3,004,808 (0) finalizeEthWithdrawal 8,251 (0) 0.00% 48,968 (-247) -0.50% 49,747 (0) 0.00% 49,747 (0) 0.00% 257 (0)
DiamondProxy 2,428,645 (0) finalizeEthWithdrawal
requestL2Transaction
util_setChainId
37,779 (0)
33,295 (0)
29,011 (0)
0.00%
0.00%
0.00%
76,310 (-232)
130,199 (+1)
33,874 (+37)
-0.30%
+0.00%
+0.11%
77,027 (0)
167,132 (+24)
33,823 (0)
0.00%
+0.01%
0.00%
77,303 (0)
191,247 (0)
34,195 (0)
0.00%
0.00%
0.00%
257 (0)
771 (0)
519 (0)
MerkleTest 442,717 (0) calculateRoot(bytes32[],uint256,bytes32) 571 (0) 0.00% 2,932 (+1) +0.03% 2,982 (0) 0.00% 3,037 (+11) +0.36% 265 (0)

l2-contracts/hardhat.config.ts Outdated Show resolved Hide resolved
l2-contracts/package.json Show resolved Hide resolved
tools/src/main.rs Show resolved Hide resolved
Copy link

Coverage after merging stanislav-breadless-evm-721-different-verifier-setup-for-era into kl/sync-layer-reorg will be

87.04%

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.sol65.54%33.77%75%77.09%110, 110, 110, 115, 121, 126, 126, 131, 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, 347, 349–350, 352–353, 380–381, 391–392, 395, 423, 447–449, 452, 452–453, 497, 505–507, 511, 511–512, 514, 528–529, 541–542, 581, 605–606, 685, 688–689, 693–694, 723–724, 733, 760, 765, 770, 775
   MessageRoot.sol92.59%66.67%100%100%148, 154, 76, 94
   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.25%33.33%55.88%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.50%36.73%86.36%85.27%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, 349, 359, 363, 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.sol81.82%62.50%82.22%83.82%110, 113, 119, 122, 133, 136, 178, 231, 237, 241, 65, 70, 85, 90
   Mailbox.sol82.27%70.59%89.66%83.57%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, 374–375, 54
   ZkSyncHyperchainBase.sol71.43%71.43%71.43%71.43%55, 55–56, 62, 62–63
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.sol93.33%80.77%100%95.96%

@StanislavBreadless StanislavBreadless merged commit 989f2c1 into kl/sync-layer-reorg Aug 30, 2024
24 checks passed
@StanislavBreadless StanislavBreadless deleted the stanislav-breadless-evm-721-different-verifier-setup-for-era branch August 30, 2024 09:59
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