-
Notifications
You must be signed in to change notification settings - Fork 395
fix: OZ ZKsync OS non interop v30, L-10 #1878
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
base: draft-v30
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| /// @param _plonkVerifier The address of the PLONK verifier contract. | ||
| /// @param _initialOwner The address of the initial owner of this contract. | ||
| constructor(IVerifierV2 _fflonkVerifier, IVerifier _plonkVerifier, address _initialOwner) { | ||
| fflonkVerifiers[0] = _fflonkVerifier; | ||
| /// @dev FFLONK is not supported for ZKsync OS as it has been deprecated. | ||
| constructor(IVerifier _plonkVerifier, address _initialOwner) { | ||
| plonkVerifiers[0] = _plonkVerifier; | ||
| _transferOwnership(_initialOwner); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructor signature now incompatible with existing callers
The constructor at this location now accepts only a PLONK verifier and the owner, but the rest of the repo still constructs ZKsyncOSDualVerifier with the old three-argument signature (e.g., ZKsyncOSTestnetVerifier calls ZKsyncOSDualVerifier(_fflonkVerifier, _plonkVerifier, _initialOwner) at l1-contracts/contracts/state-transition/verifiers/ZKsyncOSTestnetVerifier.sol:15-20 and GatewayCTMDeployer instantiates it with fflonk + plonk addresses at l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol:328-347). With this change the project no longer compiles because those call sites supply too many arguments.
Useful? React with 👍 / 👎.
| /// @notice Adds a new PLONK verifier for the specified version. | ||
| /// @param version The version number for the verifier. | ||
| /// @param _plonkVerifier The address of the PLONK verifier contract. | ||
| /// @dev Only PLONK verifiers are supported. FFLONK has been deprecated for ZKsync OS. | ||
| function addVerifier(uint32 version, IVerifier _plonkVerifier) external onlyOwner { | ||
| plonkVerifiers[version] = _plonkVerifier; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addVerifier API change breaks existing deployment script
The addVerifier function now only accepts a PLONK verifier, but the deployment script still calls addVerifier(DEFAULT_ZKSYNC_OS_VERIFIER_VERSION, IVerifierV2(...), IVerifier(...)) (see l1-contracts/deploy-scripts/DeployCTM.s.sol:223-227). This mismatch causes a compile-time error and prevents the deployment script from building.
Useful? React with 👍 / 👎.
What ❔
Why ❔
Checklist