Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b92171a2e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR introduces a two-factor authentication (2FA) mechanism for Era chain validators by adding an EraMultisigValidator contract that wraps the existing ValidatorTimelock. The new contract requires a configurable threshold of multisig member approvals before batch execution can proceed, providing an additional security layer where independent nodes verify execution parameters before state transitions are finalized on L1.
Changes:
- Added
EraMultisigValidatorcontract implementing multisig approval mechanism with EIP-712 typed signatures for batch execution - Added
IEraMultisigValidatorinterface defining the multisig validator API - Modified
ValidatorTimelockto make key functions virtual, enabling inheritance and overriding - Added comprehensive test suite covering initialization, threshold management, membership changes, approval workflows, and batch execution scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
EraMultisigValidator.sol |
Core implementation of the multisig validator with approval tracking, threshold checking, and call forwarding to ValidatorTimelock |
IEraMultisigValidator.sol |
Interface defining events, errors, and functions for the multisig validator |
ValidatorTimelock.sol |
Modified to make precommitSharedBridge, revertBatchesSharedBridge, proveBatchesSharedBridge, and executeBatchesSharedBridge virtual to enable overriding |
EraMultisigValidator.t.sol |
Comprehensive test suite with 40+ test cases covering all functionality including edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
l1-contracts/contracts/state-transition/validators/interfaces/IEraMultisigValidator.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/validators/EraMultisigValidator.sol
Outdated
Show resolved
Hide resolved
…yment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| /// @dev Shared initialization logic for EIP-712 and the validator timelock address. | ||
| function _initializeEraMultisig(address _validatorTimelock) internal { | ||
| __EIP712_init("EraMultisigValidator", "1"); |
|
Coverage after merging vb-validator-2fa-era into draft-v31 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What ❔
EraMultisigValidator- intermediate contract that validates multisig signatures of 2FA External Nodes for state transition. Designed for Era chains.Why ❔
Checklist