Skip to content

Conversation

cytadela8
Copy link
Member

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.

@cytadela8 cytadela8 changed the base branch from main to draft-v29.5 September 11, 2025 10:07
) external override {
require(signingThreshold[_chainAddress] == 0, "Chain requires verifiers signatures for commit");
_recordBatchCommitment(_chainAddress, _processBatchFrom, _processBatchTo);
_propagateToZKChain(_chainAddress);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: it would be nice if you used inheritance here i.e. invoked super.

uint256 _processBatchFrom,
uint256 _processBatchTo,
bytes calldata _batchData
) external override {
Copy link
Collaborator

Choose a reason for hiding this comment

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

no access control


_recordBatchCommitment(chainAddress, _processBatchFrom, _processBatchTo);
// we cannot use _propagateToZKChain here, becouse function signature is altered
IExecutor(chainAddress).commitBatchesSharedBridge(chainAddress, _processBatchFrom, _processBatchTo, _batchData);
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is a bit unfortunate that we do a full ABI-encoding here. It will come at a cost, but hopefully it wont be too much:

  • for rollups we'd use blobs and their commitments are small
  • for validiums/alt-DA we'd use some small commitments too

Copy link
Collaborator

@nikitastupin-matterlabs nikitastupin-matterlabs left a comment

Choose a reason for hiding this comment

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

The design looks good overall. I've left a few comments to discuss.



//TODO proper errors
//TODO maybe combine with ValidatorTimelock
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a good point to discuss. In my opinion, unless there's a reason to have two separate contracts (i.e. MultisigCommiter and ValidatorTimelock) I'd do one. Having different ValidatorTimelocks on different CTMs will make things more complex (e.g. explaining people why we have two contracts; but also keeping track which CTM has which contract).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also if a CTM owner wants to use the 2FA feature at some point it's easy to turn on in case the feature is already there (vs upgrading the implementation).


//TODO proper errors
//TODO maybe combine with ValidatorTimelock
contract MultisigCommiter is ValidatorTimelock, EIP712Upgradeable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need a new name for this contract (I mean ValidatorTimelock) since it's not just a timelock after we introduce this change

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe ValidatorRegistry

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.

3 participants