Skip to content

Conversation

mm-zk
Copy link
Collaborator

@mm-zk mm-zk commented Aug 18, 2025

Support multiple verifiers (VKs) in a single dual verifier.
This will allow us to iterate quickly in stage & testnets with the new zkos system.

Admin will be able to add/remove verifiers based off their Ids.

@mm-zk mm-zk requested a review from Deniallugo as a code owner August 20, 2025 07:02
@mm-zk mm-zk changed the title DRAFT - example of elastic verifier feat: Elastic verifier, that allows owner to set multiple VKs Aug 20, 2025
@@ -191,7 +191,7 @@ contract GatewayCTMDeployer {
_isZKsyncOS: _config.isZKsyncOS,
_deployedContracts: contracts
});
_deployVerifier(salt, _config.testnetVerifier, contracts);
_deployVerifier(salt, _config.testnetVerifier, contracts, _config.aliasedGovernanceAddress);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you provide the aliased address of the main governance.

however, this file is now used only locally so what is provided there does not really matter

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, do we have any place in the config where we have CTM owner?

@@ -104,16 +125,25 @@ contract DualVerifier is IVerifier {
/// @inheritdoc IVerifier
/// @dev Used for backward compatibility with older Verifier implementation. Returns PLONK verification key hash.
function verificationKeyHash() external view returns (bytes32) {
return PLONK_VERIFIER.verificationKeyHash();
return plonkVerifiers[0].verificationKeyHash();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always 0, is it intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I wanted it to return a 'default' verification key hash...

@mm-zk mm-zk merged commit 8a79a33 into zksync-os-stable Aug 28, 2025
15 of 24 checks passed
@mm-zk mm-zk deleted the mmzk_0818_elastic_verifier branch August 28, 2025 20:41
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